Bug Tracker

Opened 10 years ago

Closed 9 years ago

#4801 closed bug

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:
Blocked by: Blocking:

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 (1)

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

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by aq1018

Attachment: clean.patch added

This is a patch to address this issue.

comment:1 Changed 9 years ago by anonymous

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

comment:2 Changed 9 years ago by Rick Waldron

Owner: set to aq1018
Priority: majorlow
Status: newpending

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

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.