web/views/basecontrollers.py
changeset 1990 59507a12a7f4
parent 1977 606923dff11b
parent 1971 5e6799e86088
child 1996 2490e18fd3c8
--- a/web/views/basecontrollers.py	Thu May 28 11:37:27 2009 +0200
+++ b/web/views/basecontrollers.py	Thu May 28 15:09:35 2009 +0200
@@ -15,6 +15,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
@@ -417,6 +418,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)