Bug Tracker

Modify

Ticket #7626 (closed bug: duplicate)

Opened 3 years ago

Last modified 23 months ago

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

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

comment:1 Changed 3 years ago by jitter

  • Priority changed from undecided to high
  • Status changed from new to open
  • Component changed from unfiled to manipulation

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 2 years ago by john

  • Milestone set to 1.next

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

comment:3 Changed 23 months ago by john

  • Status changed from open to closed
  • Resolution set to duplicate

comment:4 Changed 23 months ago by john

Duplicate of #6558.

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.