Modify ↓
Ticket #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: | ||
| Blocking: | Blocked by: |
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
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
comment:2 Changed 2 years ago by john
- Milestone set to 1.next
Ohh, yeah - that's not good. Flagging for an upcoming release.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
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.