Bugzilla – Bug 967
xmlns attribute incorrectly accepted with any value
Last modified: 2013-03-06 02:49:14 CET
The following passes: <!DOCTYPE html> <title></title> <body xmlns=what?> It should not, because: “In HTML documents, elements in the HTML namespace may have an xmlns attribute specified, if, and only if, it has the exact value "http://www.w3.org/1999/xhtml".” http://www.w3.org/TR/html5/dom.html#global-attributes It seems that there is no check on the value of the xmlns attribute.
The logic for emitting an error message for this in the htmlparser code: http://hg.mozilla.org/projects/htmlparser/file/201db4e17f31/src/nu/validator/htmlparser/impl/TreeBuilder.java#l4695 Why that code only seems to get reached for the <html xmlns=foo> case but not for any other elements, I don't know. I'll try to get it figured out unless Henri beats me to it.