Bug Tracker

Ticket #8984 (closed bug: fixed)

Opened 3 years ago

Last modified 2 years ago

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:

 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.

Change History

comment:1 Changed 3 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

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!

comment:2 Changed 3 years ago by zeljko

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

comment:3 Changed 3 years ago by timmywil

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

comment:4 Changed 3 years ago by zeljko

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

comment:5 Changed 3 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

Note: See TracTickets for help on using tickets.