Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e4a080

Browse files
committed
Stop etree crashing on doctypes with public id but not system id. Tests later
--HG--extra : convert_revision : svn%3Aacbfec75-9323-0410-a652-858a13e371e0/trunk%401106
1 parent40f494d commit0e4a080

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

‎src/html5lib/treebuilders/etree_lxml.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ def insertRoot(self, name):
169169
docStr=""
170170
ifself.doctype:
171171
docStr+="<!DOCTYPE %s"%self.doctype.name
172-
ifself.doctype.publicIdisnotNone:
173-
docStr+=' PUBLIC "%s"'%self.doctype.publicId
174-
ifself.doctype.systemId:
175-
docStr+=' "%s"'%self.doctype.systemId
172+
ifself.doctype.publicIdisnotNoneorself.doctype.systemIdisnotNone:
173+
docStr+=' PUBLIC "%s" "%s"'%(self.doctype.publicIdor"",
174+
self.doctype.systemIdor"")
176175
docStr+=">"
177176
docStr+="<html></html>"
178177

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp