Bug Tracker

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#7626 closed bug (duplicate)

.append($foo) evaluates <script> tags, even after removed from $foo

Reported by: msnyder Owned by:
Priority: high Milestone: 1.next
Component: manipulation Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

http://jsfiddle.net/9Be5k/8/

I'm filing this bug and noting that this may be a misunderstanding in how I think jQuery works, but I think I was able to reduce the problem to something that makes sense. In the provided test case, I am making the following assumption: $(foo), where foo is a string determined not to be a selector, does not evaluate javascript code within foo.

Also reproducible in 1.4.2, and 1.4.3.

Change History (4)

comment:1 Changed 9 years ago by jitter

Component: unfiledmanipulation
Priority: undecidedhigh
Status: newopen

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase!

adapted test case

Until this bug gets fixed you can use $('body').append($content.filter(":not(script)")); as a work around for this case.

comment:2 Changed 8 years ago by john

Milestone: 1.next

Ohh, yeah - that's not good. Flagging for an upcoming release.

comment:3 Changed 8 years ago by john

Resolution: duplicate
Status: openclosed

comment:4 Changed 8 years ago by john

Duplicate of #6558.

Note: See TracTickets for help on using tickets.