Bug Tracker

Modify

Ticket #4801 (closed bug)

Opened 4 years ago

Last modified 3 years ago

clean() reorders script tags without checking type attribute

Reported by: aq1018 Owned by: aq1018
Priority: low Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

This behavior causes metadata plugin to not work properly if a node is fetched from Ajax and inserted into DOM. All child script tags will be grouped and moved to the bottom of the parent node. The script should check for type attribute of script tag to make sure it is of type 'text/javascript'. Some people uses script tags for other purposes such as storing json data, with type as 'application/json' or 'text/x-json', and the position of the script tag is important in this case.

Attachments

clean.patch Download (1014 bytes) - added by aq1018 4 years ago.
This is a patch to address this issue.

Change History

Changed 4 years ago by aq1018

This is a patch to address this issue.

comment:1 Changed 3 years ago by anonymous

nice patch, seems to work! please roll it into jQuery ASAP!

comment:2 Changed 3 years ago by rwaldron

  • Owner set to aq1018
  • Priority changed from major to low
  • Status changed from new to pending

comment:3 Changed 3 years ago by trac-o-bot

  • Status changed from pending to closed

Automatically closed due to 14 days of inactivity.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.