Skip to main content

Bug Tracker

Side navigation

#12359 closed bug (fixed)

Opened August 21, 2012 02:55AM UTC

Closed August 27, 2012 04:39PM UTC

Last modified August 27, 2012 04:48PM UTC

1.8.0 creating invalid tag/attribute when loading the library

Reported by: Herbalite Owned by:
Priority: blocker Milestone: 1.8.1
Component: selector Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

Using XHTML strict documents and all the related headers including xml declaration.

In FF 14.0.1 and Firebug 1.10.2 I get two errors. However they do not hinder code execution, so this is low priority.

The first problem occurs on line 5010

div.innerHTML = "<select><option selected></option></select>";

This should read


div.innerHTML = "<select><option **selected='selected'**></option></select>";


div.innerHTML = "<select><option **selected=\\"selected\\"**></option></select>";

The other line is 5036

div.innerHTML = "<input type='hidden'>";

This should read

div.innerHTML = "<input type='hidden'**/**>";

Attachments (0)
Change History (6)

Changed August 21, 2012 12:30PM UTC by dmethvin comment:1

#12357 is a duplicate of this ticket.

Changed August 21, 2012 01:15PM UTC by dmethvin comment:2

milestone: None1.8.1
priority: undecidedblocker
status: newopen

This is another cry for #10198. Thanks for the clear bug report!

Changed August 21, 2012 01:16PM UTC by dmethvin comment:3

component: unfiledselector

Changed August 24, 2012 08:19AM UTC by tomgrohl comment:4

As mentioned in #10198, I've wrote some code to check for content type and doctype.

It detects if closing tags / quoted attributes are required based on the following:

1 - content type is application/xhtml+xml

2 - content type is text/html and doctype is XHTML

3 - document is xul (Needs more testing though)

Generally is a doctype and/or content type is omitted it detaults to text/html.

This should fix this issue.

I'll create a pull request when I get a chance.

Changed August 27, 2012 04:39PM UTC by Timmy Willison comment:5

resolution: → fixed
status: openclosed

Sizzle: make html from assertions xhtml compliant. Fixes #12359.

Changeset: 157c561c153a7e63040904241a0e2bee82109f81

Changed August 27, 2012 04:48PM UTC by dmethvin comment:6

@Herbalite, can you try your code with and let us know if the problem has been fixed? Thanks!

P.S. Fix code now, ask me how.