Patch for validation of characters in names

David Faure faure at kde.org
Tue Jun 24 15:43:06 CEST 2003


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.

This patch (against the 3.1 branch) implements that.

For exception catching to work in kjs_binding, I also had to change
dlopening into direct linkage to ecma/*, as we did in HEAD for the same reason.

The reason for int* pException over the usual int& exception is that we
don't need to do those checks during parsing (I'm trying to keep the speed ;),
I tested that <invalid^tag> isn't parsed anyway.

I'll try to port this to CVS HEAD once I get a green light for the branch one,
but the code has changed a bit there - and Dirk and PMK don't seem to
agree on how it should be :}. It would be a good if you guys could sort this
out soon :)

-- 
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: invalidchars.diff
Type: text/x-diff
Size: 33799 bytes
Desc: not available
Url : http://mail.kde.org/mailman/private/khtml-devel/attachments/20030624/0919d452/invalidchars-0001.bin


More information about the Khtml-devel mailing list