Skip to main content

Bug Tracker

Side navigation

#7626 closed bug (duplicate)

Opened November 24, 2010 07:01PM UTC

Closed July 12, 2011 07:34PM UTC

Last modified July 12, 2011 07:34PM UTC

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

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

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.

Attachments (0)
Change History (4)

Changed November 24, 2010 07:53PM UTC by jitter comment:1

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.

Changed April 17, 2011 05:53AM UTC by john comment:2

milestone: →

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

Changed July 12, 2011 07:34PM UTC by john comment:3

resolution: → duplicate
status: openclosed

Changed July 12, 2011 07:34PM UTC by john comment:4

Duplicate of #6558.