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
+5 -4
View File
@@ -1247,8 +1247,9 @@ class HTML(DIV):
lang = 'en' lang = 'en'
self.attributes['_lang'] = lang self.attributes['_lang'] = lang
doctype = self['doctype'] doctype = self['doctype']
if doctype: if doctype is None:
if doctype == 'strict': doctype = self.transitional
elif doctype == 'strict':
doctype = self.strict doctype = self.strict
elif doctype == 'transitional': elif doctype == 'transitional':
doctype = self.transitional doctype = self.transitional
@@ -1256,10 +1257,10 @@ class HTML(DIV):
doctype = self.frameset doctype = self.frameset
elif doctype == 'html5': elif doctype == 'html5':
doctype = self.html5 doctype = self.html5
elif doctype == '':
doctype = ''
else: else:
doctype = '%s\n' % doctype doctype = '%s\n' % doctype
else:
doctype = self.transitional
(fa, co) = self._xml() (fa, co) = self._xml()
return '%s<%s%s>%s</%s>' % (doctype, self.tag, fa, co, self.tag) return '%s<%s%s>%s</%s>' % (doctype, self.tag, fa, co, self.tag)