web/views/ibreadcrumbs.py
branch3.5
changeset 3176 b94703b131ad
parent 3173 6f9da29f836a
child 3184 613064b49331
--- a/web/views/ibreadcrumbs.py	Thu Sep 10 18:49:23 2009 +0200
+++ b/web/views/ibreadcrumbs.py	Fri Sep 11 12:40:27 2009 +0200
@@ -56,9 +56,9 @@
     def wpath_part(self, part, contextentity, last=False):
         if isinstance(part, Entity):
             if last and part.eid == contextentity.eid:
-                part.view('breadcrumbtext', w=self.w)
+                self.w(xml_escape(part.view('breadcrumbtext')))
             else:
-                part.view('breadcrumbs', w=self.w)
+                self.w(part.view('breadcrumbs'))
         elif isinstance(part, tuple):
             url, title = part
             textsize = self.req.property_value('navigation.short-line-size')
@@ -99,8 +99,9 @@
     def cell_call(self, row, col):
         entity = self.rset.get_entity(row, col)
         desc = xml_escape(uilib.cut(entity.dc_description(), 50))
-        self.w(tags.a(entity.view('breadcrumbtext'), href=entity.absolute_url(),
-                      title=desc))
+        # XXX remember camember : tags.a autoescapes !
+        self.w(tags.a(entity.view('breadcrumbtext'),
+                      href=entity.absolute_url(), title=desc))
 
 
 class BreadCrumbTextView(EntityView):
@@ -109,4 +110,4 @@
     def cell_call(self, row, col):
         entity = self.rset.get_entity(row, col)
         textsize = self.req.property_value('navigation.short-line-size')
-        self.w(xml_escape(uilib.cut(entity.dc_title(), textsize)))
+        self.w(uilib.cut(entity.dc_title(), textsize))