We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40f494d commit 0e4a080Copy full SHA for 0e4a080
src/html5lib/treebuilders/etree_lxml.py
@@ -169,10 +169,9 @@ def insertRoot(self, name):
169
docStr = ""
170
if self.doctype:
171
docStr += "<!DOCTYPE %s"%self.doctype.name
172
- if self.doctype.publicId is not None:
173
- docStr += ' PUBLIC "%s"'%self.doctype.publicId
174
- if self.doctype.systemId:
175
- docStr += ' "%s"'%self.doctype.systemId
+ if self.doctype.publicId is not None or self.doctype.systemId is not None:
+ docStr += ' PUBLIC "%s" "%s"'%(self.doctype.publicId or "",
+ self.doctype.systemId or "")
176
docStr += ">"
177
docStr += "<html></html>"
178
0 commit comments