Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#12359 closed bug (fixed)

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:

Description

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

either

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

or

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'/>";

Change History (6)

comment:1 Changed 11 years ago by dmethvin

#12357 is a duplicate of this ticket.

comment:2 Changed 11 years ago by dmethvin

Milestone: None1.8.1
Priority: undecidedblocker
Status: newopen

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

comment:3 Changed 11 years ago by dmethvin

Component: unfiledselector

comment:4 Changed 11 years ago by tomgrohl

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.

comment:5 Changed 11 years ago by Timmy Willison

Resolution: fixed
Status: openclosed

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

Changeset: 157c561c153a7e63040904241a0e2bee82109f81

comment:6 Changed 11 years ago by dmethvin

@Herbalite, can you try your code with http://code.jquery.com/jquery-git.js and let us know if the problem has been fixed? Thanks!

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

Note: See TracTickets for help on using tickets.