Skip to main content

Bug Tracker

Side navigation

#8984 closed bug (fixed)

Opened April 27, 2011 08:34AM UTC

Closed May 02, 2011 05:14PM UTC

Last modified March 13, 2012 02:54PM UTC

jQuery doesn't parse html from string correctly!

Reported by: zeljko Owned by:
Priority: blocker Milestone: 1.6
Component: core Version: git
Keywords: Cc:
Blocked by: Blocking:
Description

Fiddle:

http://jsfiddle.net/FEK7F/4/

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.

Attachments (0)
Change History (5)

Changed April 27, 2011 02:52PM UTC by dmethvin comment:1

component: unfiledcore
milestone: 1.next1.6
priority: undecidedblocker
status: newopen

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!

Changed April 27, 2011 03:09PM UTC by zeljko comment:2

I'm glad to help. Thank you for the quick response.

Changed April 27, 2011 04:09PM UTC by timmywil comment:3

I made another fiddle when taking a closer look: http://jsfiddle.net/timmywil/FEK7F/6/

Changed April 28, 2011 07:12AM UTC by zeljko comment:4

Strange thing is that you get only one object if you remove few html elements from template.

Changed May 02, 2011 05:14PM UTC by John Resig comment:5

resolution: → fixed
status: openclosed

Change check for skipping the initial quickExpr RegExp check. Fixes #8984.

Changeset: 86aa764f0b7b659fbd8eec9333d22c3a79bdfcd5