#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
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 13 years ago by
Component: | unfiled → manipulation |
---|---|
Priority: | undecided → high |
Status: | new → open |
comment:2 Changed 12 years ago by
Milestone: | → 1.next |
---|
Ohh, yeah - that's not good. Flagging for an upcoming release.
comment:3 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
Note: See
TracTickets for help on using
tickets.
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.