utils.py
branchstable
changeset 9523 cd5738fc440f
parent 9279 0814b9dd9bf3
child 9579 d5b0e1f4c5c5
--- a/utils.py	Mon Feb 03 19:07:58 2014 +0100
+++ b/utils.py	Wed Feb 05 16:34:21 2014 +0100
@@ -375,9 +375,9 @@
             if skiphead:
                 # Don't insert <script> tags directly as they would be
                 # interpreted directly by some browsers (e.g. IE).
-                # Use <pre class="script"> tags instead and let
+                # Use <cubicweb:script> tags instead and let
                 # `loadAjaxHtmlHead` handle the script insertion / execution.
-                w(u'<pre class="script" src="%s"></pre>\n' %
+                w(u'<cubicweb:script src="%s"></cubicweb:script>\n' %
                   xml_escape(jsfile))
                 # FIXME: a probably better implementation might be to add
                 #        JS or CSS urls in a JS list that loadAjaxHtmlHead
@@ -392,9 +392,9 @@
         if self.post_inlined_scripts:
             if skiphead:
                 for script in self.post_inlined_scripts:
-                    w(u'<pre class="script">')
+                    w(u'<cubicweb:script>')
                     w(xml_escape(script))
-                    w(u'</pre>')
+                    w(u'</cubicweb:script>')
             else:
                 w(self.script_opening)
                 w(u'\n\n'.join(self.post_inlined_scripts))
@@ -455,8 +455,8 @@
         attrs = ' '.join('%s="%s"' % (attr, xml_escape(value))
                          for attr, value in self._htmlattrs)
         if attrs:
-            return '<html %s>' % attrs
-        return '<html>'
+            return '<html xmlns:cubicweb="http://www.cubicweb.org" %s>' % attrs
+        return '<html xmlns:cubicweb="http://www.cubicweb.org">'
 
     def getvalue(self):
         """writes HTML headers, closes </head> tag and writes HTML body"""