Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12180 closed bug (invalid)

loose markup parsing incorrect

Reported by: fredyang@… Owned by:
Priority: low Milestone: None
Component: core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

it is documented in unit test using qunit

http://jsfiddle.net/jgSrn/

Change History (2)

comment:1 Changed 7 years ago by fredyang@…

comment:2 Changed 7 years ago by sindresorhus

Component: unfiledcore
Priority: undecidedlow
Resolution: invalid
Status: newclosed

Works as intended. See docs:

When passing HTML to jQuery(), please also note that text nodes are not treated as DOM elements. With the exception of a few methods (such as .content()), they are generally otherwise ignored or removed. E.g:

var el = $('1<br/>2<br/>3'); returns [<br>, "2", <br>] el = $('1<br/>2<br/>3 >'); returns [<br>, "2", <br>, "3 &gt;"]

Note: See TracTickets for help on using tickets.