--- a/web/views/schema.py Wed Jul 15 09:45:13 2009 +0200
+++ b/web/views/schema.py Thu Jul 16 13:30:13 2009 +0200
@@ -7,7 +7,9 @@
"""
__docformat__ = "restructuredtext en"
-from logilab.mtconverter import html_escape
+from itertools import cycle
+
+from logilab.mtconverter import xml_escape
from yams import schema2dot as s2d
from cubicweb.selectors import implements, yes
@@ -47,7 +49,7 @@
def render_entity_title(self, entity):
self.w(u'<h1><span class="etype">%s</span> %s</h1>'
% (entity.dc_type().capitalize(),
- html_escape(entity.dc_long_title())))
+ xml_escape(entity.dc_long_title())))
# CWEType ######################################################################
@@ -123,8 +125,8 @@
entity = self.entity(row, col)
url = entity.absolute_url(vid='schemagraph')
self.w(u'<img src="%s" alt="%s"/>' % (
- html_escape(url),
- html_escape(self.req._('graphical schema for %s') % entity.name)))
+ xml_escape(url),
+ xml_escape(self.req._('graphical schema for %s') % entity.name)))
class CWETypeSPermView(EntityView):
id = 'cwetype-schema-permissions'
@@ -161,8 +163,8 @@
entity = self.entity(row, col)
if entity.reverse_state_of:
self.w(u'<img src="%s" alt="%s"/>' % (
- html_escape(entity.absolute_url(vid='ewfgraph')),
- html_escape(self.req._('graphical workflow for %s') % entity.name)))
+ xml_escape(entity.absolute_url(vid='ewfgraph')),
+ xml_escape(self.req._('graphical workflow for %s') % entity.name)))
else:
self.w(u'<p>%s</p>' % _('There is no workflow defined for this entity.'))