Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
952a16d0
Commit
952a16d0
authored
May 04, 2004
by
Casey Duncan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure encoding of tree state does not include newline characters (issue #122
6)
parent
c21f8a81
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
lib/python/ZTUtils/Tree.py
lib/python/ZTUtils/Tree.py
+3
-3
lib/python/ZTUtils/tests/testTree.py
lib/python/ZTUtils/tests/testTree.py
+1
-0
No files found.
lib/python/ZTUtils/Tree.py
View file @
952a16d0
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
##############################################################################
##############################################################################
__doc__
=
'''Tree manipulation classes
__doc__
=
'''Tree manipulation classes
$Id: Tree.py,v 1.1
8 2004/01/15 23:00:17 tseaver
Exp $'''
$Id: Tree.py,v 1.1
9 2004/05/04 19:33:07 caseman
Exp $'''
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
from
Acquisition
import
Explicit
from
Acquisition
import
Explicit
from
ComputedAttribute
import
ComputedAttribute
from
ComputedAttribute
import
ComputedAttribute
...
@@ -232,7 +232,7 @@ def b2a(s):
...
@@ -232,7 +232,7 @@ def b2a(s):
Encoded string use only alpahnumeric characters, and "._-".
Encoded string use only alpahnumeric characters, and "._-".
'''
'''
return
translate
(
base64
.
encodestring
(
str
(
s
)),
a2u_map
)
return
translate
(
base64
.
encodestring
(
str
(
s
)),
a2u_map
)
.
replace
(
'
\
n
'
,
''
)
def
a2b
(
s
):
def
a2b
(
s
):
'''Decode a b2a-encoded string.'''
'''Decode a b2a-encoded string.'''
...
...
lib/python/ZTUtils/tests/testTree.py
View file @
952a16d0
...
@@ -187,6 +187,7 @@ class TreeTests(unittest.TestCase):
...
@@ -187,6 +187,7 @@ class TreeTests(unittest.TestCase):
treeroot1
=
self
.
tm
.
tree
(
self
.
root
,
self
.
expansionmap
)
treeroot1
=
self
.
tm
.
tree
(
self
.
root
,
self
.
expansionmap
)
encoded
=
Tree
.
encodeExpansion
(
treeroot1
.
flat
())
encoded
=
Tree
.
encodeExpansion
(
treeroot1
.
flat
())
self
.
failIf
(
encoded
.
find
(
'
\
n
'
)
!=
-
1
)
decodedmap
=
Tree
.
decodeExpansion
(
encoded
)
decodedmap
=
Tree
.
decodeExpansion
(
encoded
)
treeroot2
=
self
.
tm
.
tree
(
self
.
root
,
decodedmap
)
treeroot2
=
self
.
tm
.
tree
(
self
.
root
,
decodedmap
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment