Bug Tracker

Opened 11 years ago

Closed 11 years ago

#12180 closed bug (invalid)

loose markup parsing incorrect

Reported by: [email protected] Owned by:
Priority: low Milestone: None
Component: core Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:


it is documented in unit test using qunit


Change History (2)

comment:2 Changed 11 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.