libhtml: Part of Bug#4287 Adds PUBLIC to all of the DOCTYPE header of the first line in all web documents. Thanks Gerald Britton for the patch file.

svn: r16000
This commit is contained in:
Rob G. Healey 2010-10-16 07:47:05 +00:00
parent 1cb6f2f3c8
commit 77f96037fa

View File

@ -427,7 +427,8 @@ class Html(list):
)
self[0:0] = [xmldecl]
#
def addDOCTYPE(self, name='html', external_id=_XHTML10_STRICT, *args):
def addDOCTYPE(self, name='html', public='PUBLIC',
external_id=_XHTML10_STRICT, *args):
"""
Add a DOCTYPE statement to the start of the list
@ -440,8 +441,9 @@ class Html(list):
:param args: 0 or more positional parameters to be added to this
DOCTYPE.
"""
doctype = '<!DOCTYPE %s %s%s>' % (
name,
doctype = '<!DOCTYPE %s %s %s%s>' % (
name,
public,
external_id,
' %s'*len(args) % args
)