diff --git a/VERSION b/VERSION index af25b765..c33ee5f9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.2.1 (2012-11-08 10:05:43) stable +Version 2.2.1 (2012-11-08 11:29:42) stable diff --git a/gluon/html.py b/gluon/html.py index 3b9f0a84..ca8ef7e6 100644 --- a/gluon/html.py +++ b/gluon/html.py @@ -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' % (doctype, self.tag, fa, co, self.tag)