web/views/basecontrollers.py
branchtls-sprint
changeset 808 8d739f6e8ef5
parent 762 a6f678fe7e44
child 823 cb8ccbef8fa5
--- a/web/views/basecontrollers.py	Wed Feb 18 15:59:09 2009 +0100
+++ b/web/views/basecontrollers.py	Wed Feb 18 16:02:44 2009 +0100
@@ -239,9 +239,10 @@
                 stream.write(u'<div id="contentmain">')
         view.dispatch()
         extresources = req.html_headers.getvalue(skiphead=True)
-        stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget ?
-        stream.write(extresources)
-        stream.write(u'</div>\n')
+        if extresources:
+            stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget ?
+            stream.write(extresources)
+            stream.write(u'</div>\n')
         if req.form.get('paginate') and divid == 'pageContent':
             stream.write(u'</div></div>')
         source = stream.getvalue()