web/views/basecontrollers.py
changeset 1996 2490e18fd3c8
parent 1995 ec95eaa2b711
parent 1990 59507a12a7f4
child 2045 bf0643d4ef36
--- a/web/views/basecontrollers.py	Thu May 28 20:06:45 2009 +0200
+++ b/web/views/basecontrollers.py	Thu May 28 20:07:18 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)