Add DTD to fix well-formedness errors in HTML5
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 4 Dec 2009 19:39:15 +0000 (19:39 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 4 Dec 2009 19:39:15 +0000 (19:39 +0000)
commit36f4e6822cafa129078263bdbf67486cb9e8bed1
tree668d70ac11de6aca8a04e4484cbd57490baa2680
parent0f0e1b307dc01d9923198b5ed51e5a35bd654d43
Add DTD to fix well-formedness errors in HTML5

Now actually tested, using Python's SAX module.  You can verify that a
page is well-formed XML (or at least won't break in pywikipediabot) with
a program like this:

import xml.sax
class Myhandler(xml.sax.ContentHandler):
    pass
h = Myhandler()
xml.sax.parse("http://localhost/git-trunk/phase3/index.php?title=Special:UserLogin",
    h)

If the page is not well-formed, this will throw an exception.  It did
with the old doctype, but no longer does if $wgWellFormedXml == true.
includes/OutputPage.php