Port fix in branch for missing PUBLIC keyword in DOCTYPE to trunk

svn: r16553
This commit is contained in:
Gerald Britton 2011-02-03 15:43:23 +00:00
parent 1dec96a00f
commit bdde8f08fe

View File

@ -417,7 +417,8 @@ class Html(list):
) )
self[0:0] = [xmldecl] 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 Add a DOCTYPE statement to the start of the list
@ -430,8 +431,9 @@ class Html(list):
:param args: 0 or more positional parameters to be added to this :param args: 0 or more positional parameters to be added to this
DOCTYPE. DOCTYPE.
""" """
doctype = '<!DOCTYPE %s %s%s>' % ( doctype = '<!DOCTYPE %s %s %s%s>' % (
name, name,
public,
external_id, external_id,
' %s'*len(args) % args ' %s'*len(args) % args
) )