Patch for validation of characters in names
David Faure
faure at kde.org
Fri Jun 27 12:54:45 CEST 2003
On Tuesday 24 June 2003 14:43, David Faure wrote:
> The DOM spec (and testsuite) requires that createElement and createAttribute
> (and the "NameSpace" versions of those)
> check that the name is a valid name acording to the XML spec, and throw
> INVALID_CHARACTER_ERR if not.
Improvement over this patch:
createHTMLElement should also check for invalid chars, but from the DOM testsuite,
it seems that creating an element named "foobar" in an HTML document should
work too - so HTMLDocumentImpl::createElement should fallback to
DOM::DocumentImpl::createElement if the tagname doesn't match a known HTML
tag. And this takes care of the "invalid character" case as well.
--
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
Qtella users - stability patches at http://blackie.dk/~dfaure/qtella.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: createhtmlelement_fallback.diff
Type: text/x-diff
Size: 4154 bytes
Desc: not available
Url : http://mail.kde.org/mailman/private/khtml-devel/attachments/20030627/3982847a/createhtmlelement_fallback.bin
More information about the Khtml-devel
mailing list