Ticket #8984 (closed bug: fixed)
jQuery doesn't parse html from string correctly!
| Reported by: | zeljko | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 1.6 |
| Component: | core | Version: | git |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Fiddle:
Description:
When parsing HTML string contained in single DIV element jQuery should return one object. In particular case (see fiddle) jQuery returns more than one object. With jQuery version <= 1.5.2 everything works as expected.
Change History
comment:1 Changed 2 years ago by dmethvin
- Priority changed from undecided to blocker
- Status changed from new to open
- Component changed from unfiled to core
- Milestone changed from 1.next to 1.6
comment:3 Changed 2 years ago by timmywil
I made another fiddle when taking a closer look: http://jsfiddle.net/timmywil/FEK7F/6/
comment:4 Changed 2 years ago by zeljko
Strange thing is that you get only one object if you remove few html elements from template.
comment:5 Changed 2 years ago by John Resig
- Status changed from open to closed
- Resolution set to fixed
Change check for skipping the initial quickExpr RegExp check. Fixes #8984.
Changeset: 86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Hmm, seems like 1.6 has the leading/trailing newlines in there as text nodes. Marking as a blocker for now. Thanks for the reports and testing, zeljko!