B #345282 xhtml requires to use   instead of   stable
authorNicolas Chauvat <nicolas.chauvat@logilab.fr>
Tue, 25 Aug 2009 22:57:47 +0200
branchstable
changeset 2996 866a2c135c33
parent 2995 4ef565c1d183
child 2997 cedc3ab1a1f5
B #345282 xhtml requires to use &#160; instead of &nbsp;
common/mixins.py
common/test/unittest_uilib.py
common/uilib.py
goa/appobjects/components.py
goa/appobjects/gauthservice.py
i18n/en.po
i18n/es.po
i18n/fr.po
schemaviewer.py
web/facet.py
web/form.py
web/formwidgets.py
web/htmlwidgets.py
web/test/unittest_form.py
web/views/basecomponents.py
web/views/baseforms.py
web/views/basetemplates.py
web/views/baseviews.py
web/views/bookmark.py
web/views/calendar.py
web/views/editviews.py
web/views/emailaddress.py
web/views/formrenderers.py
web/views/ibreadcrumbs.py
web/views/management.py
web/views/navigation.py
web/views/old_calendar.py
web/views/startup.py
web/views/timetable.py
web/widgets.py
--- a/common/mixins.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/common/mixins.py	Tue Aug 25 22:57:47 2009 +0200
@@ -1,4 +1,4 @@
-"""mixins of entity/views organized somewhat in a graph or tree structure
+ """mixins of entity/views organized somewhat in a graph or tree structure
 
 
 :organization: Logilab
@@ -343,7 +343,7 @@
     """a recursive path view"""
     id = 'path'
     item_vid = 'oneline'
-    separator = u'&nbsp;&gt;&nbsp;'
+    separator = u'&#160;&gt;&#160;'
 
     def call(self, **kwargs):
         self.w(u'<div class="pathbar">')
--- a/common/test/unittest_uilib.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/common/test/unittest_uilib.py	Tue Aug 25 22:57:47 2009 +0200
@@ -92,16 +92,16 @@
 
 generated_html = """\
 <table class="tree">
-<tr><td class="tree_cell" rowspan="2"><div class="tree_cell">root</div></td><td class="tree_cell_1_1">&nbsp;</td><td class="tree_cell_1_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_1_1</div></td><td class="tree_cell_1_1">&nbsp;</td><td class="tree_cell_1_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_2_1</div></td><td class="tree_cell_0_1">&nbsp;</td><td class="tree_cell_0_2">&nbsp;</td><td rowspan="2">&nbsp;</td></tr>
-<tr><td class="tree_cell_1_3">&nbsp;</td><td class="tree_cell_1_4">&nbsp;</td><td class="tree_cell_1_3">&nbsp;</td><td class="tree_cell_1_4">&nbsp;</td><td class="tree_cell_0_3">&nbsp;</td><td class="tree_cell_0_4">&nbsp;</td></tr>
-<tr><td rowspan="2">&nbsp;</td><td class="tree_cell_2_1">&nbsp;</td><td class="tree_cell_2_2">&nbsp;</td><td rowspan="2">&nbsp;</td><td class="tree_cell_4_1">&nbsp;</td><td class="tree_cell_4_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div id="selected" class="tree_cell">child_2_2</div></td><td class="tree_cell_1_1">&nbsp;</td><td class="tree_cell_1_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_1</div></td></tr>
-<tr><td class="tree_cell_2_3">&nbsp;</td><td class="tree_cell_2_4">&nbsp;</td><td class="tree_cell_4_3">&nbsp;</td><td class="tree_cell_4_4">&nbsp;</td><td class="tree_cell_1_3">&nbsp;</td><td class="tree_cell_1_4">&nbsp;</td></tr>
-<tr><td rowspan="2">&nbsp;</td><td class="tree_cell_2_1">&nbsp;</td><td class="tree_cell_2_2">&nbsp;</td><td rowspan="2">&nbsp;</td><td class="tree_cell_0_1">&nbsp;</td><td class="tree_cell_0_2">&nbsp;</td><td rowspan="2">&nbsp;</td><td class="tree_cell_3_1">&nbsp;</td><td class="tree_cell_3_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_2</div></td></tr>
-<tr><td class="tree_cell_2_3">&nbsp;</td><td class="tree_cell_2_4">&nbsp;</td><td class="tree_cell_0_3">&nbsp;</td><td class="tree_cell_0_4">&nbsp;</td><td class="tree_cell_3_3">&nbsp;</td><td class="tree_cell_3_4">&nbsp;</td></tr>
-<tr><td rowspan="2">&nbsp;</td><td class="tree_cell_2_1">&nbsp;</td><td class="tree_cell_2_2">&nbsp;</td><td rowspan="2">&nbsp;</td><td class="tree_cell_0_1">&nbsp;</td><td class="tree_cell_0_2">&nbsp;</td><td rowspan="2">&nbsp;</td><td class="tree_cell_4_1">&nbsp;</td><td class="tree_cell_4_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_3</div></td></tr>
-<tr><td class="tree_cell_2_3">&nbsp;</td><td class="tree_cell_2_4">&nbsp;</td><td class="tree_cell_0_3">&nbsp;</td><td class="tree_cell_0_4">&nbsp;</td><td class="tree_cell_4_3">&nbsp;</td><td class="tree_cell_4_4">&nbsp;</td></tr>
-<tr><td rowspan="2">&nbsp;</td><td class="tree_cell_4_1">&nbsp;</td><td class="tree_cell_4_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_1_2</div></td><td class="tree_cell_5_1">&nbsp;</td><td class="tree_cell_5_2">&nbsp;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_2_3</div></td><td class="tree_cell_0_1">&nbsp;</td><td class="tree_cell_0_2">&nbsp;</td><td rowspan="2">&nbsp;</td></tr>
-<tr><td class="tree_cell_4_3">&nbsp;</td><td class="tree_cell_4_4">&nbsp;</td><td class="tree_cell_5_3">&nbsp;</td><td class="tree_cell_5_4">&nbsp;</td><td class="tree_cell_0_3">&nbsp;</td><td class="tree_cell_0_4">&nbsp;</td></tr>
+<tr><td class="tree_cell" rowspan="2"><div class="tree_cell">root</div></td><td class="tree_cell_1_1">&#160;</td><td class="tree_cell_1_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_1_1</div></td><td class="tree_cell_1_1">&#160;</td><td class="tree_cell_1_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_2_1</div></td><td class="tree_cell_0_1">&#160;</td><td class="tree_cell_0_2">&#160;</td><td rowspan="2">&#160;</td></tr>
+<tr><td class="tree_cell_1_3">&#160;</td><td class="tree_cell_1_4">&#160;</td><td class="tree_cell_1_3">&#160;</td><td class="tree_cell_1_4">&#160;</td><td class="tree_cell_0_3">&#160;</td><td class="tree_cell_0_4">&#160;</td></tr>
+<tr><td rowspan="2">&#160;</td><td class="tree_cell_2_1">&#160;</td><td class="tree_cell_2_2">&#160;</td><td rowspan="2">&#160;</td><td class="tree_cell_4_1">&#160;</td><td class="tree_cell_4_2">&#160;</td><td class="tree_cell" rowspan="2"><div id="selected" class="tree_cell">child_2_2</div></td><td class="tree_cell_1_1">&#160;</td><td class="tree_cell_1_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_1</div></td></tr>
+<tr><td class="tree_cell_2_3">&#160;</td><td class="tree_cell_2_4">&#160;</td><td class="tree_cell_4_3">&#160;</td><td class="tree_cell_4_4">&#160;</td><td class="tree_cell_1_3">&#160;</td><td class="tree_cell_1_4">&#160;</td></tr>
+<tr><td rowspan="2">&#160;</td><td class="tree_cell_2_1">&#160;</td><td class="tree_cell_2_2">&#160;</td><td rowspan="2">&#160;</td><td class="tree_cell_0_1">&#160;</td><td class="tree_cell_0_2">&#160;</td><td rowspan="2">&#160;</td><td class="tree_cell_3_1">&#160;</td><td class="tree_cell_3_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_2</div></td></tr>
+<tr><td class="tree_cell_2_3">&#160;</td><td class="tree_cell_2_4">&#160;</td><td class="tree_cell_0_3">&#160;</td><td class="tree_cell_0_4">&#160;</td><td class="tree_cell_3_3">&#160;</td><td class="tree_cell_3_4">&#160;</td></tr>
+<tr><td rowspan="2">&#160;</td><td class="tree_cell_2_1">&#160;</td><td class="tree_cell_2_2">&#160;</td><td rowspan="2">&#160;</td><td class="tree_cell_0_1">&#160;</td><td class="tree_cell_0_2">&#160;</td><td rowspan="2">&#160;</td><td class="tree_cell_4_1">&#160;</td><td class="tree_cell_4_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_3_3</div></td></tr>
+<tr><td class="tree_cell_2_3">&#160;</td><td class="tree_cell_2_4">&#160;</td><td class="tree_cell_0_3">&#160;</td><td class="tree_cell_0_4">&#160;</td><td class="tree_cell_4_3">&#160;</td><td class="tree_cell_4_4">&#160;</td></tr>
+<tr><td rowspan="2">&#160;</td><td class="tree_cell_4_1">&#160;</td><td class="tree_cell_4_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_1_2</div></td><td class="tree_cell_5_1">&#160;</td><td class="tree_cell_5_2">&#160;</td><td class="tree_cell" rowspan="2"><div class="tree_cell">child_2_3</div></td><td class="tree_cell_0_1">&#160;</td><td class="tree_cell_0_2">&#160;</td><td rowspan="2">&#160;</td></tr>
+<tr><td class="tree_cell_4_3">&#160;</td><td class="tree_cell_4_4">&#160;</td><td class="tree_cell_5_3">&#160;</td><td class="tree_cell_5_4">&#160;</td><td class="tree_cell_0_3">&#160;</td><td class="tree_cell_0_4">&#160;</td></tr>
 </table>\
 """
 
--- a/common/uilib.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/common/uilib.py	Tue Aug 25 22:57:47 2009 +0200
@@ -357,9 +357,9 @@
                 else:
                     s += '<td class="tree_cell" rowspan="2"><div class="tree_cell">%s</div></td>' % (render_node(cell.id))
             else:
-                s += '<td rowspan="2">&nbsp;</td>'
-            s += '<td class="tree_cell_%d_1">&nbsp;</td>' % link_cell
-            s += '<td class="tree_cell_%d_2">&nbsp;</td>' % link_cell
+                s += '<td rowspan="2">&#160;</td>'
+            s += '<td class="tree_cell_%d_1">&#160;</td>' % link_cell
+            s += '<td class="tree_cell_%d_2">&#160;</td>' % link_cell
 
         cell = line[-1]
         if cell:
@@ -368,14 +368,14 @@
             else:
                 s += '<td class="tree_cell" rowspan="2"><div class="tree_cell">%s</div></td>' % (render_node(cell.id))
         else:
-            s += '<td rowspan="2">&nbsp;</td>'
+            s += '<td rowspan="2">&#160;</td>'
 
         s += '</tr>\n'
         if link_line:
             s += '<tr>'
             for j, link_cell in enumerate(link_line):
-                s += '<td class="tree_cell_%d_3">&nbsp;</td>' % link_cell
-                s += '<td class="tree_cell_%d_4">&nbsp;</td>' % link_cell
+                s += '<td class="tree_cell_%d_3">&#160;</td>' % link_cell
+                s += '<td class="tree_cell_%d_4">&#160;</td>' % link_cell
             s += '</tr>\n'
 
     s += '</table>'
@@ -428,7 +428,7 @@
             xml_escape(stackentry[0]), stackentry[1], xml_escape(stackentry[2])))
         if stackentry[3]:
             string = xml_escape(stackentry[3]).decode('utf-8', 'replace')
-            strings.append(u'&nbsp;&nbsp;%s<br/>\n' % (string))
+            strings.append(u'&#160;&#160;%s<br/>\n' % (string))
         # add locals info for each entry
         try:
             local_context = tcbk.tb_frame.f_locals
--- a/goa/appobjects/components.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/goa/appobjects/components.py	Tue Aug 25 22:57:47 2009 +0200
@@ -74,7 +74,7 @@
         label = display_name(req, etype, 'plural')
         view = self.vreg.select('views', 'list', req, req.etype_rset(etype))
         url = view.url()
-        etypelink = u'&nbsp;<a href="%s">%s</a>' % (xml_escape(url), label)
+        etypelink = u'&#160;<a href="%s">%s</a>' % (xml_escape(url), label)
         yield (label, etypelink, self.add_entity_link(eschema, req))
 
 ManageView.entity_types = entity_types_no_count
--- a/goa/appobjects/gauthservice.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/goa/appobjects/gauthservice.py	Tue Aug 25 22:57:47 2009 +0200
@@ -17,7 +17,7 @@
 
     def anon_user_link(self):
         self.w(self.req._('anonymous'))
-        self.w(u'&nbsp;[<a class="logout" href="%s">%s</a>]'
+        self.w(u'&#160;[<a class="logout" href="%s">%s</a>]'
                % (users.create_login_url(self.req.url()), self.req._('login')))
 
 class GAELogoutAction(LogoutAction):
--- a/i18n/en.po	Tue Aug 25 19:42:19 2009 +0200
+++ b/i18n/en.po	Tue Aug 25 22:57:47 2009 +0200
@@ -75,31 +75,31 @@
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;days"
+msgid "%d&#160;days"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;hours"
+msgid "%d&#160;hours"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;minutes"
+msgid "%d&#160;minutes"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;months"
+msgid "%d&#160;months"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;seconds"
+msgid "%d&#160;seconds"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;weeks"
+msgid "%d&#160;weeks"
 msgstr ""
 
 #, python-format
-msgid "%d&nbsp;years"
+msgid "%d&#160;years"
 msgstr ""
 
 #, python-format
--- a/i18n/es.po	Tue Aug 25 19:42:19 2009 +0200
+++ b/i18n/es.po	Tue Aug 25 22:57:47 2009 +0200
@@ -80,32 +80,32 @@
 msgstr "%d años"
 
 #, python-format
-msgid "%d&nbsp;days"
-msgstr "%d&nbsp;días"
+msgid "%d&#160;days"
+msgstr "%d&#160;días"
 
 #, python-format
-msgid "%d&nbsp;hours"
-msgstr "%d&nbsp;horas"
+msgid "%d&#160;hours"
+msgstr "%d&#160;horas"
 
 #, python-format
-msgid "%d&nbsp;minutes"
-msgstr "%d&nbsp;minutos"
+msgid "%d&#160;minutes"
+msgstr "%d&#160;minutos"
 
 #, python-format
-msgid "%d&nbsp;months"
-msgstr "%d&nbsp;meses"
+msgid "%d&#160;months"
+msgstr "%d&#160;meses"
 
 #, python-format
-msgid "%d&nbsp;seconds"
-msgstr "%d&nbsp;segundos"
+msgid "%d&#160;seconds"
+msgstr "%d&#160;segundos"
 
 #, python-format
-msgid "%d&nbsp;weeks"
-msgstr "%d&nbsp;semanas"
+msgid "%d&#160;weeks"
+msgstr "%d&#160;semanas"
 
 #, python-format
-msgid "%d&nbsp;years"
-msgstr "%d&nbsp;años"
+msgid "%d&#160;years"
+msgstr "%d&#160;años"
 
 #, python-format
 msgid "%s error report"
--- a/i18n/fr.po	Tue Aug 25 19:42:19 2009 +0200
+++ b/i18n/fr.po	Tue Aug 25 22:57:47 2009 +0200
@@ -80,32 +80,32 @@
 msgstr "%d années"
 
 #, python-format
-msgid "%d&nbsp;days"
-msgstr "%d&nbsp;jours"
+msgid "%d&#160;days"
+msgstr "%d&#160;jours"
 
 #, python-format
-msgid "%d&nbsp;hours"
-msgstr "%d&nbsp;heures"
+msgid "%d&#160;hours"
+msgstr "%d&#160;heures"
 
 #, python-format
-msgid "%d&nbsp;minutes"
-msgstr "%d&nbsp;minutes"
+msgid "%d&#160;minutes"
+msgstr "%d&#160;minutes"
 
 #, python-format
-msgid "%d&nbsp;months"
-msgstr "%d&nbsp;mois"
+msgid "%d&#160;months"
+msgstr "%d&#160;mois"
 
 #, python-format
-msgid "%d&nbsp;seconds"
-msgstr "%d&nbsp;secondes"
+msgid "%d&#160;seconds"
+msgstr "%d&#160;secondes"
 
 #, python-format
-msgid "%d&nbsp;weeks"
-msgstr "%d&nbsp;semaines"
+msgid "%d&#160;weeks"
+msgstr "%d&#160;semaines"
 
 #, python-format
-msgid "%d&nbsp;years"
-msgstr "%d&nbsp;années"
+msgid "%d&#160;years"
+msgstr "%d&#160;années"
 
 #, python-format
 msgid "%s error report"
--- a/schemaviewer.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/schemaviewer.py	Tue Aug 25 22:57:47 2009 +0200
@@ -104,7 +104,7 @@
         """get a layout for an entity schema"""
         etype = eschema.type
         layout = Section(children=' ', klass='clear')
-        layout.append(Link(etype,'&nbsp;' , id=etype)) # anchor
+        layout.append(Link(etype,'&#160;' , id=etype)) # anchor
         title = Link(self.eschema_link_url(eschema), etype)
         boxchild = [Section(children=(title, ' (%s)'% eschema.display_name(self.req)), klass='title')]
         table = Table(cols=4, rheaders=1,
--- a/web/facet.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/facet.py	Tue Aug 25 22:57:47 2009 +0200
@@ -718,7 +718,7 @@
             imgalt = self.req._('not selected')
         self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n'
                % (cssclass, xml_escape(unicode(self.value))))
-        self.w(u'<img src="%s" alt="%s"/>&nbsp;' % (imgsrc, imgalt))
+        self.w(u'<img src="%s" alt="%s"/>&#160;' % (imgsrc, imgalt))
         self.w(u'<a href="javascript: {}">%s</a>' % xml_escape(self.label))
         self.w(u'</div>')
 
@@ -747,7 +747,7 @@
         self.w(u'<div class="facetValue facetCheckBox%s" cubicweb:value="%s">\n'
                % (cssclass, xml_escape(unicode(self.value))))
         self.w(u'<div class="facetCheckBoxWidget">')
-        self.w(u'<img src="%s" alt="%s" cubicweb:unselimg="true" />&nbsp;' % (imgsrc, imgalt))
+        self.w(u'<img src="%s" alt="%s" cubicweb:unselimg="true" />&#160;' % (imgsrc, imgalt))
         self.w(u'<label class="facetTitle" cubicweb:facetName="%s"><a href="javascript: {}">%s</a></label>' % (facetid, title))
         self.w(u'</div>\n')
         self.w(u'</div>\n')
@@ -755,7 +755,7 @@
 
 class FacetSeparator(HTMLWidget):
     def __init__(self, label=None):
-        self.label = label or u'&nbsp;'
+        self.label = label or u'&#160;'
 
     def _render(self):
         pass
--- a/web/form.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/form.py	Tue Aug 25 22:57:47 2009 +0200
@@ -164,7 +164,7 @@
                 if len(errors) > 1:
                     templstr = '<li>%s</li>\n'
                 else:
-                    templstr = '&nbsp;%s\n'
+                    templstr = '&#160;%s\n'
                 for field, err in errors:
                     if field is None:
                         errormsg += templstr % err
--- a/web/formwidgets.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/formwidgets.py	Tue Aug 25 22:57:47 2009 +0200
@@ -110,7 +110,7 @@
                   '<br/>',
                   tags.input(name=confirmname, value=values[0], type=self.type,
                              **attrs),
-                  '&nbsp;', tags.span(form.req._('confirm password'),
+                  '&#160;', tags.span(form.req._('confirm password'),
                                       **{'class': 'emphasis'})]
         return u'\n'.join(inputs)
 
@@ -437,7 +437,7 @@
         return super(AddComboBoxWidget, self).render(form, field, renderer) + u'''
 <div id="newvalue">
   <input type="text" id="newopt" />
-  <a href="javascript:noop()" id="add_newopt">&nbsp;</a></div>
+  <a href="javascript:noop()" id="add_newopt">&#160;</a></div>
 '''
 
 # buttons ######################################################################
--- a/web/htmlwidgets.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/htmlwidgets.py	Tue Aug 25 22:57:47 2009 +0200
@@ -75,7 +75,7 @@
             self.w(u'</ul>\n')
         self.w(u'</div>\n')
         if self.shadow:
-            self.w(u'<div class="shadow">&nbsp;</div>')
+            self.w(u'<div class="shadow">&#160;</div>')
 
     def _render(self):
         if self.id:
@@ -191,7 +191,7 @@
         self.value = value
 
     def _render(self):
-        self.w(u'<li><div><span class="label">%s</span>&nbsp;'
+        self.w(u'<li><div><span class="label">%s</span>&#160;'
                u'<span class="value">%s</span></div></li>'
                % (self.label, self.value))
 
--- a/web/test/unittest_form.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/test/unittest_form.py	Tue Aug 25 22:57:47 2009 +0200
@@ -219,7 +219,7 @@
                               '''<input id="upassword:%(eid)s" name="upassword:%(eid)s" tabindex="1" type="password" value="__cubicweb_internal_field__" />
 <br/>
 <input name="upassword-confirm:%(eid)s" tabindex="1" type="password" value="__cubicweb_internal_field__" />
-&nbsp;
+&#160;
 <span class="emphasis">confirm password</span>''' % {'eid': self.entity.eid})
 
 
--- a/web/views/basecomponents.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/basecomponents.py	Tue Aug 25 22:57:47 2009 +0200
@@ -73,7 +73,7 @@
     id = 'help'
     property_defs = VISIBLE_PROP_DEF
     def call(self):
-        self.w(u'<a href="%s" class="help" title="%s">&nbsp;</a>'
+        self.w(u'<a href="%s" class="help" title="%s">&#160;</a>'
                % (self.build_url(_restpath='doc/main'),
                   self.req._(u'help'),))
 
@@ -109,11 +109,11 @@
     def anon_user_link(self):
         if self.config['auth-mode'] == 'cookie':
             self.w(self.req._('anonymous'))
-            self.w(u'''&nbsp;[<a class="logout" href="javascript: popupLoginBox();">%s</a>]'''
+            self.w(u'''&#160;[<a class="logout" href="javascript: popupLoginBox();">%s</a>]'''
                    % (self.req._('i18n_login_popup')))
         else:
             self.w(self.req._('anonymous'))
-            self.w(u'&nbsp;[<a class="logout" href="%s">%s</a>]'
+            self.w(u'&#160;[<a class="logout" href="%s">%s</a>]'
                    % (self.build_url('login'), self.req._('login')))
 
 
@@ -211,7 +211,7 @@
                     url, _('Any')))
         else:
             html.insert(0, u'<span class="selected">%s</span>' % _('Any'))
-        self.w(u'&nbsp;|&nbsp;'.join(html))
+        self.w(u'&#160;|&#160;'.join(html))
         self.w(u'</div>')
 
 
--- a/web/views/baseforms.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/baseforms.py	Tue Aug 25 22:57:47 2009 +0200
@@ -239,7 +239,7 @@
                 w(u'</tr>')
         pendings = list(self.restore_pending_inserts(entity))
         if not pendings:
-            w(u'<tr><th>&nbsp;</th><td>&nbsp;</td></tr>')
+            w(u'<tr><th>&#160;</th><td>&#160;</td></tr>')
         else:
             for row in pendings:
                 # soon to be linked to entities
@@ -314,7 +314,7 @@
                                   % (rschema, entity.eid, js,
                                      self.req.__('add a %s' % targettype)))
                     result.append(u'</div>')
-                    result.append(u'<div class="trame_grise">&nbsp;</div>')
+                    result.append(u'<div class="trame_grise">&#160;</div>')
                 result.append(u'</div>')
         return '\n'.join(result)
 
--- a/web/views/basetemplates.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/basetemplates.py	Tue Aug 25 22:57:47 2009 +0200
@@ -441,7 +441,7 @@
         self.w(u'<div id="%s" class="%s">' % (id, klass))
         if title:
             self.w(u'<div id="loginTitle">%s</div>'
-                   % (self.req.property_value('ui.site-title') or u'&nbsp;'))
+                   % (self.req.property_value('ui.site-title') or u'&#160;'))
         self.w(u'<div id="loginContent">\n')
 
         if message:
@@ -472,7 +472,7 @@
         self.w(u'<td><label for="__password" >%s</label></td>' % _('password'))
         self.w(u'<td><input name="__password" id="__password" class="data" type="password" /></td>\n')
         self.w(u'</tr><tr>\n')
-        self.w(u'<td>&nbsp;</td><td><input type="submit" class="loginButton right" value="%s" />\n</td>' % _('log in'))
+        self.w(u'<td>&#160;</td><td><input type="submit" class="loginButton right" value="%s" />\n</td>' % _('log in'))
         self.w(u'</tr>\n')
         self.w(u'</table>\n')
         self.w(u'</form>\n')
--- a/web/views/baseviews.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/baseviews.py	Tue Aug 25 22:57:47 2009 +0200
@@ -51,13 +51,13 @@
     """
     id = 'final'
     # record generated i18n catalog messages
-    _('%d&nbsp;years')
-    _('%d&nbsp;months')
-    _('%d&nbsp;weeks')
-    _('%d&nbsp;days')
-    _('%d&nbsp;hours')
-    _('%d&nbsp;minutes')
-    _('%d&nbsp;seconds')
+    _('%d&#160;years')
+    _('%d&#160;months')
+    _('%d&#160;weeks')
+    _('%d&#160;days')
+    _('%d&#160;hours')
+    _('%d&#160;minutes')
+    _('%d&#160;seconds')
     _('%d years')
     _('%d months')
     _('%d weeks')
@@ -80,7 +80,7 @@
             # value is DateTimeDelta but we have no idea about what is the
             # reference date here, so we can only approximate years and months
             if format == 'text/html':
-                space = '&nbsp;'
+                space = '&#160;'
             else:
                 space = ' '
             if value.days > 730: # 2 years
@@ -111,7 +111,7 @@
         secondary = icon + view(oneline)
         """
         entity = self.entity(row, col)
-        self.w(u'&nbsp;')
+        self.w(u'&#160;')
         self.wview('oneline', self.rset, row=row, col=col)
 
 
--- a/web/views/bookmark.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/bookmark.py	Tue Aug 25 22:57:47 2009 +0200
@@ -33,7 +33,7 @@
     def cell_call(self, row, col):
         """the primary view for bookmark entity"""
         entity = self.complete_entity(row, col)
-        self.w(u'&nbsp;')
+        self.w(u'&#160;')
         self.w(u"<span class='title'><b>")
         self.w(u"%s : %s" % (self.req._('Bookmark'), xml_escape(entity.title)))
         self.w(u"</b></span>")
--- a/web/views/calendar.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/calendar.py	Tue Aug 25 22:57:47 2009 +0200
@@ -293,7 +293,7 @@
                                  __redirectvid=self.id
                                  )
             self.w(u'<div class="cmd"><a href="%s">%s</a></div>' % (xml_escape(url), self.req._(u'add')))
-            self.w(u'&nbsp;')
+            self.w(u'&#160;')
         self.w(u'</div>')
         self.w(u'<div class="cellContent">')
         for task_descr in rows:
@@ -312,7 +312,7 @@
                 self.w(u'</div>')
             else:
                 self.w(u'<div class="task">')
-                self.w(u"&nbsp;")
+                self.w(u"&#160;")
             self.w(u'</div>')
         self.w(u'</div>')
         self.w(u'</td>')
@@ -443,7 +443,7 @@
         self.w(u'</tr>')
         self.w(u'</table></div>')
         self.w(u'<div id="coord"></div>')
-        self.w(u'<div id="debug">&nbsp;</div>')
+        self.w(u'<div id="debug">&#160;</div>')
 
     def _build_calendar_cell(self, date, task_descrs):
         inday_tasks = [t for t in task_descrs if t.is_one_day_task() and  t.in_working_hours()]
--- a/web/views/editviews.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/editviews.py	Tue Aug 25 22:57:47 2009 +0200
@@ -63,7 +63,7 @@
         entity = self.entity(row, col)
         erset = entity.as_rset()
         if self.req.match_search_state(erset):
-            self.w(u'<a href="%s" title="%s">%s</a>&nbsp;<a href="%s" title="%s">[...]</a>' % (
+            self.w(u'<a href="%s" title="%s">%s</a>&#160;<a href="%s" title="%s">[...]</a>' % (
                 xml_escape(linksearch_select_url(self.req, erset)),
                 self.req._('select this entity'),
                 xml_escape(entity.view('textoutofcontext')),
--- a/web/views/emailaddress.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/emailaddress.py	Tue Aug 25 22:57:47 2009 +0200
@@ -27,7 +27,7 @@
         if not entity.canonical:
             canonemailaddr = entity.canonical_form()
             if canonemailaddr:
-                self.w(u'&nbsp;(<i>%s</i>)' % canonemailaddr.view('oneline'))
+                self.w(u'&#160;(<i>%s</i>)' % canonemailaddr.view('oneline'))
             self.w(u'</h3>')
         elif entity.identical_to:
             self.w(u'</h3>')
--- a/web/views/formrenderers.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/formrenderers.py	Tue Aug 25 22:57:47 2009 +0200
@@ -104,7 +104,7 @@
         if example:
             help.append('<div class="helper">(%s: %s)</div>'
                         % (self.req._('sample format'), example))
-        return u'&nbsp;'.join(help)
+        return u'&#160;'.join(help)
 
     # specific methods (mostly to ease overriding) #############################
 
@@ -125,7 +125,7 @@
                 if len(errors) > 1:
                     templstr = '<li>%s</li>\n'
                 else:
-                    templstr = '&nbsp;%s\n'
+                    templstr = '&#160;%s\n'
                 for field, err in errors:
                     if field is None:
                         errormsg += templstr % err
@@ -279,7 +279,7 @@
             if self.display_help:
                 w(self.render_help(form, field))
         # empty slot for buttons
-        w(u'<th class="labelCol">&nbsp;</th>')
+        w(u'<th class="labelCol">&#160;</th>')
         w(u'</tr>')
         w(u'<tr>')
         for field in fields:
@@ -436,7 +436,7 @@
                 w(u'</tr>')
         pendings = list(form.restore_pending_inserts())
         if not pendings:
-            w(u'<tr><th>&nbsp;</th><td>&nbsp;</td></tr>')
+            w(u'<tr><th>&#160;</th><td>&#160;</td></tr>')
         else:
             for row in pendings:
                 # soon to be linked to entities
@@ -514,7 +514,7 @@
             w(u'<a class="addEntity" id="add%s:%slink" href="javascript: %s" >+ %s.</a>'
               % (rschema, entity.eid, js, __('add a %s' % targettype)))
             w(u'</div>')
-            w(u'<div class="trame_grise">&nbsp;</div>')
+            w(u'<div class="trame_grise">&#160;</div>')
         w(u'</div>')
 
 
--- a/web/views/ibreadcrumbs.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/ibreadcrumbs.py	Tue Aug 25 22:57:47 2009 +0200
@@ -33,7 +33,7 @@
     context = 'navtop'
     order = 5
     visible = False
-    separator = u'&nbsp;&gt;&nbsp;'
+    separator = u'&#160;&gt;&#160;'
 
     def call(self, view=None, first_separator=True):
         entity = self.entity(0)
--- a/web/views/management.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/management.py	Tue Aug 25 22:57:47 2009 +0200
@@ -139,7 +139,7 @@
                 # don't give __delete value to build_url else it will be urlquoted
                 # and this will replace %s by %25s
                 delurl += '&__delete=%s:require_permission:%%s' % entity.eid
-                dellinktempl = u'[<a href="%s" title="%s">-</a>]&nbsp;' % (
+                dellinktempl = u'[<a href="%s" title="%s">-</a>]&#160;' % (
                     xml_escape(delurl), _('delete this permission'))
             else:
                 dellinktempl = None
--- a/web/views/navigation.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/navigation.py	Tue Aug 25 22:57:47 2009 +0200
@@ -40,9 +40,9 @@
                                             self.index_display(start, stop)))
             start = stop + 1
         w(u'<div class="pagination">')
-        w(u'%s&nbsp;' % self.previous_link(params))
-        w(u'[&nbsp;%s&nbsp;]' % u'&nbsp;| '.join(blocklist))
-        w(u'&nbsp;%s' % self.next_link(params))
+        w(u'%s&#160;' % self.previous_link(params))
+        w(u'[&#160;%s&#160;]' % u'&#160;| '.join(blocklist))
+        w(u'&#160;%s' % self.next_link(params))
         w(u'</div>')
 
     def index_display(self, start, stop):
@@ -140,9 +140,9 @@
 
     def write_links(self, params, blocklist):
         self.w(u'<div class="pagination">')
-        self.w(u'%s&nbsp;' % self.previous_link(params))
-        self.w(u'[&nbsp;%s&nbsp;]' % u'&nbsp;| '.join(blocklist))
-        self.w(u'&nbsp;%s' % self.next_link(params))
+        self.w(u'%s&#160;' % self.previous_link(params))
+        self.w(u'[&#160;%s&#160;]' % u'&#160;| '.join(blocklist))
+        self.w(u'&#160;%s' % self.next_link(params))
         self.w(u'</div>')
 
 
--- a/web/views/old_calendar.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/old_calendar.py	Tue Aug 25 22:57:47 2009 +0200
@@ -30,8 +30,8 @@
 
     # Navigation building methods / views ####################################
 
-    PREV = u'<a href="%s">&lt;&lt;</a>&nbsp;&nbsp;<a href="%s">&lt;</a>'
-    NEXT = u'<a href="%s">&gt;</a>&nbsp;&nbsp;<a href="%s">&gt;&gt;</a>'
+    PREV = u'<a href="%s">&lt;&lt;</a>&#160;&#160;<a href="%s">&lt;</a>'
+    NEXT = u'<a href="%s">&gt;</a>&#160;&#160;<a href="%s">&gt;&gt;</a>'
     NAV_HEADER = u"""<table class="calendarPageHeader">
 <tr><td class="prev">%s</td><td class="next">%s</td></tr>
 </table>
@@ -200,7 +200,7 @@
         self.w(u'<tr>')
         rql = self.rset.printable_rql()
         for cur_month in date_range(begin, end, incmonth=1):
-            umonth = u'%s&nbsp;%s' % (self.format_date(cur_month, '%B'), cur_month.year)
+            umonth = u'%s&#160;%s' % (self.format_date(cur_month, '%B'), cur_month.year)
             url = self.build_url(rql=rql, vid=self.id,
                                  year=cur_month.year, month=cur_month.month)
             self.w(u'<th colspan="2"><a href="%s">%s</a></th>' % (xml_escape(url),
@@ -215,7 +215,7 @@
                 else:
                     day = date(cur_month.year, cur_month.month, day_num+1)
                     events = schedule.get(day)
-                    self.w(u'<td>%s&nbsp;%s</td>\n' % (_(WEEKDAYS[day.weekday()])[0].upper(), day_num+1))
+                    self.w(u'<td>%s&#160;%s</td>\n' % (_(WEEKDAYS[day.weekday()])[0].upper(), day_num+1))
                     self.format_day_events(day, events)
             self.w(u'</tr>')
 
@@ -345,8 +345,8 @@
             am_row = [am for day, am, pm in row]
             pm_row = [pm for day, am, pm in row]
             formatted_rows.append('<tr>%s%s</tr>'% (week_title, '\n'.join(day_row)))
-            formatted_rows.append('<tr class="amRow"><td>&nbsp;</td>%s</tr>'% '\n'.join(am_row))
-            formatted_rows.append('<tr class="pmRow"><td>&nbsp;</td>%s</tr>'% '\n'.join(pm_row))
+            formatted_rows.append('<tr class="amRow"><td>&#160;</td>%s</tr>'% '\n'.join(am_row))
+            formatted_rows.append('<tr class="pmRow"><td>&#160;</td>%s</tr>'% '\n'.join(pm_row))
         # tigh everything together
         url = self.build_url(rql=rql, vid='ampmcalendarmonth',
                              year=first_day.year, month=first_day.month)
@@ -364,7 +364,7 @@
         self.w(u'<tr>')
         rql = self.rset.printable_rql()
         for cur_month in date_range(begin, end, incmonth=1):
-            umonth = u'%s&nbsp;%s' % (self.format_date(cur_month, '%B'), cur_month.year)
+            umonth = u'%s&#160;%s' % (self.format_date(cur_month, '%B'), cur_month.year)
             url = self.build_url(rql=rql, vid=self.id,
                                  year=cur_month.year, month=cur_month.month)
             self.w(u'<th colspan="3"><a href="%s">%s</a></th>' % (xml_escape(url),
@@ -379,7 +379,7 @@
                 else:
                     day = date(cur_month.year, cur_month.month, day_num+1)
                     events = schedule.get(day)
-                    self.w(u'<td>%s&nbsp;%s</td>\n' % (_(WEEKDAYS[day.weekday()])[0].upper(),
+                    self.w(u'<td>%s&#160;%s</td>\n' % (_(WEEKDAYS[day.weekday()])[0].upper(),
                                                        day_num+1))
                     self.format_day_events(day, events)
             self.w(u'</tr>')
@@ -437,8 +437,8 @@
             am_row = [am for day, am, pm in row]
             pm_row = [pm for day, am, pm in row]
             formatted_rows.append('<tr>%s%s</tr>'% (week_title, '\n'.join(day_row)))
-            formatted_rows.append('<tr class="amRow"><td>&nbsp;</td>%s</tr>'% '\n'.join(am_row))
-            formatted_rows.append('<tr class="pmRow"><td>&nbsp;</td>%s</tr>'% '\n'.join(pm_row))
+            formatted_rows.append('<tr class="amRow"><td>&#160;</td>%s</tr>'% '\n'.join(am_row))
+            formatted_rows.append('<tr class="pmRow"><td>&#160;</td>%s</tr>'% '\n'.join(pm_row))
         # tigh everything together
         url = self.build_url(rql=rql, vid='ampmcalendarmonth',
                              year=first_day.year, month=first_day.month)
@@ -464,7 +464,7 @@
             monthlink = '<a href="%s">%s</a>' % (xml_escape(url), umonth)
             w(u'<tr>%s</tr>' % (
                 WEEK_TITLE % (_('week'), monday.isocalendar()[1], monthlink)))
-            w(u'<tr><th>%s</th><th>&nbsp;</th></tr>'% _(u'Date'))
+            w(u'<tr><th>%s</th><th>&#160;</th></tr>'% _(u'Date'))
             for day in date_range(monday, sunday):
                 events = schedule.get(day)
                 style = day.weekday() % 2 and "even" or "odd"
@@ -534,9 +534,9 @@
 AMPM_CONTENT = u'<td class="%s"><span class="cellTitle">%s</span><div class="cellContent">%s</div></td>'
 
 WEEK_TITLE = u'<th class="weekTitle" colspan="2">%s %s (%s)</th>'
-WEEK_EMPTY_CELL = u'<td class="weekEmptyCell">&nbsp;</td>'
+WEEK_EMPTY_CELL = u'<td class="weekEmptyCell">&#160;</td>'
 WEEK_CELL = u'<td class="weekCell"><div class="cellContent">%s</div></td>'
 
-AMPM_DAYWEEK_EMPTY = u'<td>%s&nbsp;%s</td>'
-AMPM_DAYWEEK = u'<td rowspan="%d">%s&nbsp;%s</td>'
+AMPM_DAYWEEK_EMPTY = u'<td>%s&#160;%s</td>'
+AMPM_DAYWEEK = u'<td rowspan="%d">%s&#160;%s</td>'
 AMPM_WEEK_CELL = u'<td class="ampmWeekCell"><div class="cellContent">%02d:%02d - %s</div></td>'
--- a/web/views/startup.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/startup.py	Tue Aug 25 22:57:47 2009 +0200
@@ -62,10 +62,10 @@
             self.wview('inlined', rset, row=0)
         else:
             self.entities()
-            self.w(u'<div class="hr">&nbsp;</div>')
+            self.w(u'<div class="hr">&#160;</div>')
             self.startup_views()
         if manager and 'Card' in self.schema:
-            self.w(u'<div class="hr">&nbsp;</div>')
+            self.w(u'<div class="hr">&#160;</div>')
             if rset:
                 href = rset.get_entity(0, 0).absolute_url(vid='edition')
                 label = self.req._('edit the index page')
@@ -114,7 +114,7 @@
                        key=lambda (l,a,e):unormalize(l))
         q, r = divmod(len(infos), 2)
         if r:
-            infos.append( (None, '&nbsp;', '&nbsp;') )
+            infos.append( (None, '&#160;', '&#160;') )
         infos = zip(infos[:q+r], infos[q+r:])
         for (_, etypelink, addlink), (_, etypelink2, addlink2) in infos:
             self.w(u'<tr>\n')
@@ -136,7 +136,7 @@
             label = display_name(req, etype, 'plural')
             nb = req.execute('Any COUNT(X) WHERE X is %s' % etype)[0][0]
             url = self.build_url(etype)
-            etypelink = u'&nbsp;<a href="%s">%s</a> (%d)' % (
+            etypelink = u'&#160;<a href="%s">%s</a> (%d)' % (
                 xml_escape(url), label, nb)
             yield (label, etypelink, self.add_entity_link(eschema, req))
 
--- a/web/views/timetable.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/views/timetable.py	Tue Aug 25 22:57:47 2009 +0200
@@ -133,7 +133,7 @@
         """ render column headers """
         self.w(u'<tr class="header">\n')
 
-        self.w(u'<th class="ttdate">&nbsp;</th>\n')
+        self.w(u'<th class="ttdate">&#160;</th>\n')
         columns = []
         for user, width in zip(users, widths):
             self.w(u'<th colspan="%s">' % max(MIN_COLS, width))
@@ -191,13 +191,13 @@
                         task_descr, first_row = value
                         if first_row:
                             url = xml_escape(task_descr.task.absolute_url(vid="edition"))
-                            self.w(u'<td rowspan="%d" class="%s %s" onclick="document.location=\'%s\'">&nbsp;<div>' % (
+                            self.w(u'<td rowspan="%d" class="%s %s" onclick="document.location=\'%s\'">&#160;<div>' % (
                                 task_descr.lines, task_descr.color, filled_klasses[kj], url))
                             task_descr.task.view('tooltip', w=self.w)
                             self.w(u'</div></td>')
                     else:
                         if empty_line:
-                            self.w(u'<td class="ttempty">&nbsp;</td>')
+                            self.w(u'<td class="ttempty">&#160;</td>')
                         else:
-                            self.w(u'<td class="%s">&nbsp;</td>' % empty_klasses[kj] )
+                            self.w(u'<td class="%s">&#160;</td>' % empty_klasses[kj] )
             self.w(u'</tr>\n')
--- a/web/widgets.py	Tue Aug 25 19:42:19 2009 +0200
+++ b/web/widgets.py	Tue Aug 25 22:57:47 2009 +0200
@@ -154,7 +154,7 @@
             help.append(u'<span>(%s: %s)</span>'
                         % (req._('sample format'), example))
         help.append(u'</div>')
-        return u'&nbsp;'.join(help)
+        return u'&#160;'.join(help)
 
     def render_example(self, req):
         return u''
@@ -372,7 +372,7 @@
     def _edit_render(self, entity):
         html = super(PasswordWidget, self)._edit_render(entity)
         name = eid_param(self.name + '-confirm', entity.eid)
-        return u'%s<br/>\n<input type="%s" name="%s" id="%s" tabindex="%s"/>&nbsp;<span class="emphasis">(%s)</span>' % (
+        return u'%s<br/>\n<input type="%s" name="%s" id="%s" tabindex="%s"/>&#160;<span class="emphasis">(%s)</span>' % (
             html, self.input_type, name, name, entity.req.next_tabindex(),
             entity.req._('confirm password'))
 
@@ -662,7 +662,7 @@
         res.append(u'</select>')
         res.append(u'<div id="newvalue">')
         res.append(u'<input type="text" id="newopt" />')
-        res.append(u'<a href="javascript:noop()" id="add_newopt">&nbsp;</a></div>')
+        res.append(u'<a href="javascript:noop()" id="add_newopt">&#160;</a></div>')
         return '\n'.join(res)
 
 
@@ -761,7 +761,7 @@
             help.append('<span>(%s: %s)</span>'
                         % (req._('sample format'), example))
         help.append(u'</div>')
-        return u'&nbsp;'.join(help)
+        return u'&#160;'.join(help)
 
     def render_calendar_popup(self, entity):
         """calendar popup widget"""