Skip to main content

Bug Tracker

Side navigation

#4806 closed bug (worksforme)

Opened June 22, 2009 10:44PM UTC

Closed June 12, 2010 07:03PM UTC

Node creation using $(html) breaks in IE when tag string is unclosed and attrs are used

Reported by: dantman Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

http://jsbin.com/ejote

   Test              ie7   ie8    opera  firefox  midori
<span></span>        Pass  Pass   Pass   Pass     Pass
<span />             Pass  Pass   Pass   Pass     Pass
<span/>              Pass  Pass   Pass   Pass     Pass
<span>               Pass  Pass   Pass   Pass     Pass
<span class=foo />   Pass  Pass   Pass   Pass     Pass
<span class=foo>     Fail  Fail   Pass   Pass     Pass
<span class="foo">   Fail  Fail   Pass   Pass     Pass

<span></span>

<span />

<span/>

<span>

<span class=foo />

All work in ie7, ie8, opera, firefox, and midori.

<span class=foo>

<span class="foo">

Fail in ie7 and ie8 while they work in firefox, midori, and opera.

Attachments (0)
Change History (2)

Changed June 23, 2009 01:15AM UTC by dmethvin comment:1

What should jQuery do with malformed HTML? Since that is an error case, I don't think you should expect consistent behavior.

Changed June 12, 2010 07:03PM UTC by dmethvin comment:2

component: unfiledcore
resolution: → worksforme
status: newclosed

The current api documentation clarifies that closing tags are required; this is mandated by use of the browser's underlying

.innerHTML
mechanism so we don't have a lot of control over that.