HTML(doctype=''), issue 1140
This commit is contained in:
@@ -1 +1 @@
|
||||
Version 2.2.1 (2012-11-08 10:05:43) stable
|
||||
Version 2.2.1 (2012-11-08 11:29:42) stable
|
||||
|
||||
+13
-12
@@ -1247,19 +1247,20 @@ class HTML(DIV):
|
||||
lang = 'en'
|
||||
self.attributes['_lang'] = lang
|
||||
doctype = self['doctype']
|
||||
if doctype:
|
||||
if doctype == 'strict':
|
||||
doctype = self.strict
|
||||
elif doctype == 'transitional':
|
||||
doctype = self.transitional
|
||||
elif doctype == 'frameset':
|
||||
doctype = self.frameset
|
||||
elif doctype == 'html5':
|
||||
doctype = self.html5
|
||||
else:
|
||||
doctype = '%s\n' % doctype
|
||||
else:
|
||||
if doctype is None:
|
||||
doctype = self.transitional
|
||||
elif doctype == 'strict':
|
||||
doctype = self.strict
|
||||
elif doctype == 'transitional':
|
||||
doctype = self.transitional
|
||||
elif doctype == 'frameset':
|
||||
doctype = self.frameset
|
||||
elif doctype == 'html5':
|
||||
doctype = self.html5
|
||||
elif doctype == '':
|
||||
doctype = ''
|
||||
else:
|
||||
doctype = '%s\n' % doctype
|
||||
(fa, co) = self._xml()
|
||||
return '%s<%s%s>%s</%s>' % (doctype, self.tag, fa, co, self.tag)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user