Skip to main content

Bug Tracker

Side navigation

#10236 closed bug (duplicate)

Opened September 09, 2011 02:12PM UTC

Closed September 09, 2011 02:29PM UTC

Last modified September 09, 2011 03:08PM UTC

Regression in jQuery 1.6.3: not working with XHTML documents because of inserting non-wellformed XML

Reported by: anonymous Owned by:
Priority: blocker Milestone: 1.6.4
Component: support Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:
Description

jQuery 1.6.3 inserts non-wellformed XML so that it produces error messages in browsers, leaving "jQuery" and "$" undefined. This does not happen with jQuery 1.6.2.

The problem where jQuery.support is defined, at line 1182:

// Preliminary tests
	div.setAttribute("className", "t");
	div.innerHTML = "   <link><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type=checkbox>";

This is not well-formed XML because <input type=checkbox> misses quotes. It should be <input type="checkbox"> or <input type='checkbox'>.

The problem does not occur with jQuery 1.6.2 because there it reads:

<input type='checkbox'/>

which is well-formed XML.

Because of this, jQuery 1.6.3 can't be used in XHTML ("application/xhtml+xml") documents.

This is what Firefox shows after I updated jQuery to 1.6.3: http://i56.tinypic.com/abjxo0.png

Attachments (0)
Change History (4)

Changed September 09, 2011 02:29PM UTC by rwaldron comment:1

component: unfiledsupport
milestone: None1.6.4
priority: undecidedblocker
resolution: → duplicate
status: newclosed

Changed September 09, 2011 02:29PM UTC by rwaldron comment:2

Duplicate of #10197.

Changed September 09, 2011 03:07PM UTC by Herbalite comment:3

When inserting the quotes as suggested above the next non XML conform issue is that neither the link, nor the input tag in that line is terminated.

When the line 1182 looks like the follwing jQuery appears to be working again.

div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";

Changed September 09, 2011 03:08PM UTC by rwaldron comment:4

Closed as duplicate. This issue has already been _fixed_