Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:2 Changed 10 months ago by dmethvin
- Priority changed from undecided to blocker
- Status changed from new to open
- Milestone changed from None to 1.8.1
This is another cry for #10198. Thanks for the clear bug report!
comment:4 Changed 10 months 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 10 months ago by Timmy Willison
- Status changed from open to closed
- Resolution set to fixed
Sizzle: make html from assertions xhtml compliant. Fixes #12359.
Changeset: 157c561c153a7e63040904241a0e2bee82109f81
comment:6 Changed 10 months 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

#12357 is a duplicate of this ticket.