WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 5317
3622
setAttribute is too restrictive on valid attribute names ("_" for instance)
https://bugs.webkit.org/show_bug.cgi?id=3622
Summary
setAttribute is too restrictive on valid attribute names ("_" for instance)
tommyboy78
Reported
2005-06-20 13:05:56 PDT
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)
Comment 1
2005-06-21 23:10:08 PDT
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
Comment 2
2005-06-24 02:28:17 PDT
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
Comment 3
2005-06-25 18:14:20 PDT
"_sortType" seems like a valid XML name to me:
http://www.w3.org/TR/xml11/#NT-NameStartChar
Eric Seidel (no email)
Comment 4
2005-12-28 00:07:23 PST
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
Comment 5
2006-03-10 07:14:38 PST
It works for me with nightly 13244. I think this should be closed.
Alexey Proskuryakov
Comment 6
2006-03-10 10:55:10 PST
*** This bug has been marked as a duplicate of
5317
***
Lucas Forschler
Comment 7
2019-02-06 09:03:44 PST
Mass moving XML DOM bugs to the "DOM" Component.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug