equal
deleted
inserted
replaced
11 |
11 |
12 from logilab.common import interface |
12 from logilab.common import interface |
13 from logilab.common.compat import all |
13 from logilab.common.compat import all |
14 from logilab.common.decorators import cached |
14 from logilab.common.decorators import cached |
15 from logilab.common.deprecation import obsolete |
15 from logilab.common.deprecation import obsolete |
16 from logilab.mtconverter import TransformData, TransformError, html_escape |
16 from logilab.mtconverter import TransformData, TransformError, xml_escape |
17 |
17 |
18 from rql.utils import rqlvar_maker |
18 from rql.utils import rqlvar_maker |
19 |
19 |
20 from cubicweb import Unauthorized |
20 from cubicweb import Unauthorized |
21 from cubicweb.rset import ResultSet |
21 from cubicweb.rset import ResultSet |
454 return self.mtc_transform(value.getvalue(), attrformat, format, |
454 return self.mtc_transform(value.getvalue(), attrformat, format, |
455 encoding) |
455 encoding) |
456 return u'' |
456 return u'' |
457 value = printable_value(self.req, attrtype, value, props, displaytime) |
457 value = printable_value(self.req, attrtype, value, props, displaytime) |
458 if format == 'text/html': |
458 if format == 'text/html': |
459 value = html_escape(value) |
459 value = xml_escape(value) |
460 return value |
460 return value |
461 |
461 |
462 def mtc_transform(self, data, format, target_format, encoding, |
462 def mtc_transform(self, data, format, target_format, encoding, |
463 _engine=ENGINE): |
463 _engine=ENGINE): |
464 trdata = TransformData(data, format, encoding, appobject=self) |
464 trdata = TransformData(data, format, encoding, appobject=self) |