diff -r f178182b1305 -r af4d8f75c5db web/views/management.py
--- a/web/views/management.py Tue Jul 07 13:25:24 2009 +0200
+++ b/web/views/management.py Tue Jul 07 13:26:44 2009 +0200
@@ -9,7 +9,7 @@
__docformat__ = "restructuredtext en"
_ = unicode
-from logilab.mtconverter import html_escape
+from logilab.mtconverter import xml_escape
from cubicweb.selectors import yes, none_rset, match_user_groups, authenticated_user
from cubicweb.view import AnyRsetView, StartupView, EntityView
@@ -84,8 +84,8 @@
_ = self.req._
w(u'
'
% (entity.dc_type().capitalize(),
- html_escape(entity.absolute_url()),
- html_escape(entity.dc_title())))
+ xml_escape(entity.absolute_url()),
+ xml_escape(entity.dc_title())))
# first show permissions defined by the schema
self.w('%s
' % _('schema\'s permissions definitions'))
self.schema_definition(entity.e_schema)
@@ -141,7 +141,7 @@
# and this will replace %s by %25s
delurl += '&__delete=%s:require_permission:%%s' % entity.eid
dellinktempl = u'[-] ' % (
- html_escape(delurl), _('delete this permission'))
+ xml_escape(delurl), _('delete this permission'))
else:
dellinktempl = None
w(u'')
@@ -218,14 +218,14 @@
if excinfo is not None and self.config['print-traceback']:
if exclass is None:
w(u'%s
'
- % html_escape(ex).replace("\n","
"))
+ % xml_escape(ex).replace("\n","
"))
else:
w(u'%s: %s
'
- % (exclass, html_escape(ex).replace("\n","
")))
+ % (exclass, xml_escape(ex).replace("\n","
")))
w(u'
')
w(u'%s
' % html_traceback(excinfo, ex, ''))
else:
- w(u'%s
' % (html_escape(ex).replace("\n","
")))
+ w(u'%s
' % (xml_escape(ex).replace("\n","
")))
# if excinfo is not None, it's probably not a bug
if excinfo is None:
return
@@ -272,7 +272,7 @@
return unicode(repr(ex), encoding, 'replace')
def text_error_description(ex, excinfo, req, eversion, cubes):
- binfo = rest_traceback(excinfo, html_escape(ex))
+ binfo = rest_traceback(excinfo, xml_escape(ex))
binfo += u'\n\n:URL: %s\n' % req.url()
if not '__bugreporting' in req.form:
binfo += u'\n:form params:\n'
@@ -322,7 +322,7 @@
self.w(u'')
for attr in env.keys():
self.w(u'%s | %s |
'
- % (attr, html_escape(env[attr])))
+ % (attr, xml_escape(env[attr])))
self.w(u'
')
self.w(u'%s
' % _('Request'))
self.w(u'')
@@ -331,7 +331,7 @@
'search_state', 'the_request', 'unparsed_uri', 'uri'):
val = getattr(req, attr)
self.w(u'%s | %s |
'
- % (attr, html_escape(val)))
+ % (attr, xml_escape(val)))
self.w(u'
')
server = req.server
self.w(u'%s
' % _('Server'))
@@ -341,6 +341,6 @@
if attr.startswith('_') or callable(val):
continue
self.w(u'%s | %s |
'
- % (attr, html_escape(val)))
+ % (attr, xml_escape(val)))
self.w(u'
')