web/views/basecontrollers.py
branchstable
changeset 1971 5e6799e86088
parent 1889 874a055c373b
child 1990 59507a12a7f4
--- a/web/views/basecontrollers.py	Wed May 27 15:01:19 2009 +0200
+++ b/web/views/basecontrollers.py	Wed May 27 15:54:29 2009 +0200
@@ -14,6 +14,7 @@
 import simplejson
 
 from logilab.common.decorators import cached
+from logilab.mtconverter import html_escape
 
 from cubicweb import NoSelectableObject, ValidationError, ObjectNotFound, typed_eid
 from cubicweb.utils import strptime
@@ -416,6 +417,8 @@
             rset = entity.related(rtype, role)
             if rset:
                 output = self.view(vid, rset)
+                if vid == 'textoutofcontext':
+                    output = html_escape(output)
             else:
                 output = default
             return (success, args, output)