diff -r ea1a44e4ad62 -r caad2367d940 web/views/startup.py
--- a/web/views/startup.py Wed Jul 15 09:45:13 2009 +0200
+++ b/web/views/startup.py Thu Jul 16 13:30:13 2009 +0200
@@ -74,7 +74,7 @@
else:
href = req.build_url('view', vid='creation', etype='Card', wikiid='index')
label = self.req._('create an index page')
- self.w(u'
%s\n' % (html_escape(href), label))
+ self.w(u'
%s\n' % (xml_escape(href), label))
def folders(self):
self.w(u'
%s
\n' % self.req._('Browse by category'))
@@ -89,7 +89,7 @@
if v.category != 'startupview' or v.id in ('index', 'tree', 'manage'):
continue
self.w('%s
' % (
- html_escape(v.url()), html_escape(self.req._(v.title).capitalize())))
+ xml_escape(v.url()), xml_escape(self.req._(v.title).capitalize())))
def entities(self):
schema = self.schema
@@ -144,7 +144,7 @@
else:
url = self.build_url('view', rql='%s X' % etype)
etypelink = u' %s (%d)' % (
- html_escape(url), label, nb)
+ xml_escape(url), label, nb)
yield (label, etypelink, self.add_entity_link(eschema, req))
def add_entity_link(self, eschema, req):
@@ -152,13 +152,13 @@
if not eschema.has_perm(req, 'add'):
return u''
return u'[+]' % (
- html_escape(self.create_url(eschema.type)),
+ xml_escape(self.create_url(eschema.type)),
self.req.__('add a %s' % eschema))
class IndexView(ManageView):
id = 'index'
- title = _('index')
+ title = _('view_index')
def display_folders(self):
return 'Folder' in self.schema and self.req.execute('Any COUNT(X) WHERE X is Folder')[0][0]
@@ -184,9 +184,9 @@
self.w(_(u'')
- % html_escape(self.build_url('view', vid='schemagraph', skipmeta=0)))
+ % xml_escape(self.build_url('view', vid='schemagraph', withmeta=1)))
self.w(u'
\n' % (
- html_escape(self.req.build_url('view', vid='schemagraph', skipmeta=1)),
+ xml_escape(self.req.build_url('view', vid='schemagraph', skipmeta=1)),
self.req._("graphical representation of the application'schema")))
@@ -228,15 +228,15 @@
self.w(u'%s
' % _('index').capitalize())
self.w(u'%s
' % _('Entities').capitalize())
ents = []
- for eschema in entities:
- url = html_escape(self.build_url('schema', **formparams))
+ for eschema in sorted(entities):
+ url = xml_escape(self.build_url('schema', **formparams))
ents.append(u'%s (%s)' % (
url, eschema.type, eschema.type, _(eschema.type)))
self.w(u', '.join(ents))
self.w(u'%s
' % (_('relations').capitalize()))
rels = []
- for rschema in relations:
- url = html_escape(self.build_url('schema', **formparams))
+ for rschema in sorted(relations):
+ url = xml_escape(self.build_url('schema', **formparams))
rels.append(u'%s (%s), ' % (
url , rschema.type, rschema.type, _(rschema.type)))
self.w(u', '.join(ents))
@@ -254,7 +254,7 @@
for eschema in entities:
self.w(u'' % (eschema.type, eschema.type))
self.w(u'%s (%s) ' % (eschema.type, _(eschema.type)))
- url = html_escape(self.build_url('schema', **formparams) + '#index')
+ url = xml_escape(self.build_url('schema', **formparams) + '#index')
self.w(u'
' % (
url, self.req.external_resource('UP_ICON'), _('up')))
self.w(u'
')
@@ -281,7 +281,7 @@
for rschema in relations:
self.w(u'' % (rschema.type, rschema.type))
self.w(u'%s (%s) ' % (rschema.type, _(rschema.type)))
- url = html_escape(self.build_url('schema', **formparams) + '#index')
+ url = xml_escape(self.build_url('schema', **formparams) + '#index')
self.w(u'
' % (
url, self.req.external_resource('UP_ICON'), _('up')))
self.w(u'
')