Bug 3622
Summary: | setAttribute is too restrictive on valid attribute names ("_" for instance) | ||
---|---|---|---|
Product: | WebKit | Reporter: | tommyboy78 |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | andersca, cdumez |
Priority: | P3 | ||
Version: | 412 | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://webfx.eae.net/dhtml/sortabletable/largetabledemo.html |
tommyboy78
The page has buttons that should sort the table columns and also clicking on a column header should sort
the column in question. Neither one does anything in Safari. Works correctly in Firefox, Opera and Win IE.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Joost de Valk (AlthA)
It doesn't work in Safari and it does in firefox, confirming, switching to normal tho since i can't see how
this is major or p2, so making it p3.
Anders Carlsson
The problem here is that there's a call to
c.setAttribute( "_sortType", oSortTypes[i] );
and "_sortType" is an invalid xml name because it can't begin with _ so an exception is thrown.
I've examined both WinIE and Gecko and they seem to be very liberal about what characters to allow in
attribute and element names. I could even create an element with the name "*"! (This is true for both
HTML and XHTML)
I'm not sure what the correct fix here is, we could be more liberal for HTML documents while still being
restrictive for XML documents.
Ian 'Hixie' Hickson
"_sortType" seems like a valid XML name to me:
http://www.w3.org/TR/xml11/#NT-NameStartChar
Eric Seidel (no email)
This has been reduced, we just need someone to write up a nice testcase for it now. This should be a
trivial fix. ElementImpl::setAttributeNS is the method in question. dom_elementimpl.cpp is the file. I
believe it uses validation routines for QualifiedName, but you'd have to check.
Daniele Metilli
It works for me with nightly 13244. I think this should be closed.
Alexey Proskuryakov
*** This bug has been marked as a duplicate of 5317 ***
Lucas Forschler
Mass moving XML DOM bugs to the "DOM" Component.