From 77f96037fa1b7c0f5f7c585dc530937ade8d5118 Mon Sep 17 00:00:00 2001 From: "Rob G. Healey" Date: Sat, 16 Oct 2010 07:47:05 +0000 Subject: [PATCH] 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 --- src/plugins/lib/libhtml.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/lib/libhtml.py b/src/plugins/lib/libhtml.py index 41d81f385..60a1f2e43 100644 --- a/src/plugins/lib/libhtml.py +++ b/src/plugins/lib/libhtml.py @@ -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 = '' % ( - name, + doctype = '' % ( + name, + public, external_id, ' %s'*len(args) % args )