equal
deleted
inserted
replaced
319 if value is None and metadata == 'encoding': |
319 if value is None and metadata == 'encoding': |
320 value = self.vreg.property_value('ui.encoding') |
320 value = self.vreg.property_value('ui.encoding') |
321 return value |
321 return value |
322 |
322 |
323 def printable_value(self, attr, value=_marker, attrtype=None, |
323 def printable_value(self, attr, value=_marker, attrtype=None, |
324 format='text/html', displaytime=True): |
324 format='text/html'): |
325 """return a displayable value (i.e. unicode string) which may contains |
325 """return a displayable value (i.e. unicode string) which may contains |
326 html tags |
326 html tags |
327 """ |
327 """ |
328 attr = str(attr) |
328 attr = str(attr) |
329 if value is _marker: |
329 if value is _marker: |
349 if attrformat: |
349 if attrformat: |
350 encoding = self.attr_metadata(attr, 'encoding') |
350 encoding = self.attr_metadata(attr, 'encoding') |
351 return self.mtc_transform(value.getvalue(), attrformat, format, |
351 return self.mtc_transform(value.getvalue(), attrformat, format, |
352 encoding) |
352 encoding) |
353 return u'' |
353 return u'' |
354 value = printable_value(self.req, attrtype, value, props, displaytime) |
354 value = printable_value(self.req, attrtype, value, props) |
355 if format == 'text/html': |
355 if format == 'text/html': |
356 value = xml_escape(value) |
356 value = xml_escape(value) |
357 return value |
357 return value |
358 |
358 |
359 def mtc_transform(self, data, format, target_format, encoding, |
359 def mtc_transform(self, data, format, target_format, encoding, |