HTML(doctype=''), issue 1140

This commit is contained in:
mdipierro
2012-11-08 11:29:47 -06:00
parent 6fc70fbc55
commit 1abc31895e
2 changed files with 14 additions and 13 deletions
+1 -1
View File
@@ -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
View File
@@ -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)