imported patch cookie handling: do not use semicolon as it has some tech meaning (web2 -> web) stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 16 Jun 2010 12:24:11 +0200
branchstable
changeset 5758 37968502da70
parent 5757 e501806ab489
child 5759 5db529e0a3ee
imported patch cookie handling: do not use semicolon as it has some tech meaning (web2 -> web)
web/views/basecontrollers.py
web/views/treeview.py
--- a/web/views/basecontrollers.py	Wed Jun 16 09:53:17 2010 +0200
+++ b/web/views/basecontrollers.py	Wed Jun 16 12:24:11 2010 +0200
@@ -543,12 +543,12 @@
             cookies[statename] = nodeeid
             self._cw.set_cookie(cookies, statename)
         else:
-            marked = set(filter(None, treestate.value.split(';')))
+            marked = set(filter(None, treestate.value.split(':')))
             if nodeeid in marked:
                 marked.remove(nodeeid)
             else:
                 marked.add(nodeeid)
-            cookies[statename] = ';'.join(marked)
+            cookies[statename] = ':'.join(marked)
             self._cw.set_cookie(cookies, statename)
 
     @jsonize
--- a/web/views/treeview.py	Wed Jun 16 09:53:17 2010 +0200
+++ b/web/views/treeview.py	Wed Jun 16 12:24:11 2010 +0200
@@ -142,7 +142,7 @@
         cookies = self._cw.get_cookie()
         treestate = cookies.get(treecookiename(treeid))
         if treestate:
-            return str(eeid) in treestate.value.split(';')
+            return str(eeid) in treestate.value.split(':')
         return self.default_branch_state_is_open
 
     def cell_call(self, row, col, treeid, vid='oneline', parentvid='treeview',