entity.py
changeset 2381 caad2367d940
parent 2144 51c84d585456
parent 2320 17dc9661af57
child 2421 08d42928fe36
--- a/entity.py	Wed Jul 15 09:45:13 2009 +0200
+++ b/entity.py	Thu Jul 16 13:30:13 2009 +0200
@@ -13,7 +13,7 @@
 from logilab.common.compat import all
 from logilab.common.decorators import cached
 from logilab.common.deprecation import obsolete
-from logilab.mtconverter import TransformData, TransformError, html_escape
+from logilab.mtconverter import TransformData, TransformError, xml_escape
 
 from rql.utils import rqlvar_maker
 
@@ -463,7 +463,7 @@
             return u''
         value = printable_value(self.req, attrtype, value, props, displaytime)
         if format == 'text/html':
-            value = html_escape(value)
+            value = xml_escape(value)
         return value
 
     def mtc_transform(self, data, format, target_format, encoding,
@@ -666,6 +666,7 @@
                     self.critical("can't get value for attribute %s of entity with eid %s",
                                   name, self.eid)
                     if self.e_schema.destination(name) == 'String':
+                        # XXX (syt) imo emtpy string is better
                         self[name] = value = self.req._('unaccessible')
                     else:
                         self[name] = value = None