[reledit] do not strip values (we should not make judgements about field contents ...) stable
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Wed, 08 Jul 2009 19:11:22 +0200
branchstable
changeset 2331 4c02a761d879
parent 2330 8c70ca715fe9
child 2332 b04d80f19075
[reledit] do not strip values (we should not make judgements about field contents ...)
web/views/editforms.py
--- a/web/views/editforms.py	Wed Jul 08 19:02:29 2009 +0200
+++ b/web/views/editforms.py	Wed Jul 08 19:11:22 2009 +0200
@@ -109,14 +109,13 @@
         if not default:
             default = xml_escape(self.req._('<no value>'))
         if rschema.is_final():
-            value = entity.printable_value(rtype)
-            value = value.strip() or default
+            value = entity.printable_value(rtype) or default
             if not entity.has_perm('update'):
                 self.w(value)
                 return
         else:
             rset = entity.related(rtype, role)
-            candidate = self.view(rvid, rset, 'null').strip()
+            candidate = self.view(rvid, rset, 'null')
             if candidate and escape:
                 value = xml_escape(candidate)
             value = candidate or default
@@ -147,7 +146,6 @@
         self.w(form.form_render(renderer=renderer))
 
     def _build_relation_form(self, entity, value, rtype, role, row, col, rvid, default, escape, lzone):
-        print rvid, escape
         divid = 'd%s' % make_uid('%s-%s' % (rtype, entity.eid))
         event_data = {'divid' : divid, 'eid' : entity.eid, 'rtype' : rtype, 'vid' : rvid,
                       'default' : default, 'role' : role, 'escape' : escape, 'lzone' : lzone}