web/views/treeview.py
branchstable
changeset 2312 af4d8f75c5db
parent 2216 b44b06520ddc
child 2379 3fb9ceb5650f
equal deleted inserted replaced
2311:f178182b1305 2312:af4d8f75c5db
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     6 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
     7 """
     7 """
     8 __docformat__ = "restructuredtext en"
     8 __docformat__ = "restructuredtext en"
     9 
     9 
    10 from logilab.common.decorators import monkeypatch
    10 from logilab.common.decorators import monkeypatch
    11 from logilab.mtconverter import html_escape
    11 from logilab.mtconverter import xml_escape
    12 
    12 
    13 from cubicweb.utils import make_uid
    13 from cubicweb.utils import make_uid
    14 from cubicweb.interfaces import ITree
    14 from cubicweb.interfaces import ITree
    15 from cubicweb.selectors import implements
    15 from cubicweb.selectors import implements
    16 from cubicweb.view import EntityView
    16 from cubicweb.view import EntityView
   111             if is_last:
   111             if is_last:
   112                 liclasses.append('last')
   112                 liclasses.append('last')
   113             w(u'<li class="%s">' % u' '.join(liclasses))
   113             w(u'<li class="%s">' % u' '.join(liclasses))
   114         else:
   114         else:
   115             rql = entity.children_rql() % {'x': entity.eid}
   115             rql = entity.children_rql() % {'x': entity.eid}
   116             url = html_escape(self.build_url('json', rql=rql, vid=parentvid,
   116             url = xml_escape(self.build_url('json', rql=rql, vid=parentvid,
   117                                              pageid=self.req.pageid,
   117                                              pageid=self.req.pageid,
   118                                              treeid=treeid,
   118                                              treeid=treeid,
   119                                              fname='view',
   119                                              fname='view',
   120                                              subvid=vid))
   120                                              subvid=vid))
   121             divclasses = ['hitarea']
   121             divclasses = ['hitarea']