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
88d4b3d3
Commit
88d4b3d3
authored
Dec 11, 1997
by
Jeffrey Shell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed base64/URL problems
parent
e61f0265
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
lib/python/TreeDisplay/TreeTag.py
lib/python/TreeDisplay/TreeTag.py
+12
-5
No files found.
lib/python/TreeDisplay/TreeTag.py
View file @
88d4b3d3
...
...
@@ -9,17 +9,21 @@
# rights reserved.
#
############################################################################
__rcs_id__
=
'$Id: TreeTag.py,v 1.1
7 1997/12/05 18:06:37 brian
Exp $'
__version__
=
'$Revision: 1.1
7
$'
[
11
:
-
2
]
__rcs_id__
=
'$Id: TreeTag.py,v 1.1
8 1997/12/11 15:28:24 jeffrey
Exp $'
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
from
DocumentTemplate.DT_Util
import
*
from
DocumentTemplate.DT_String
import
String
from
string
import
join
,
split
,
rfind
,
find
from
string
import
join
,
split
,
rfind
,
find
,
translate
from
urllib
import
quote
,
unquote
from
zlib
import
compress
,
decompress
from
binascii
import
b2a_base64
,
a2b_base64
tbl
=
join
(
map
(
chr
,
range
(
256
)),
''
)
tplus
=
tbl
[:
ord
(
'+'
)]
+
'-'
+
tbl
[
ord
(
'+'
)
+
1
:]
tminus
=
tbl
[:
ord
(
'-'
)]
+
'+'
+
tbl
[
ord
(
'-'
)
+
1
:]
class
Tree
:
name
=
'tree'
blockContinuations
=
()
...
...
@@ -221,6 +225,7 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,
s
=
b2a_base64
(
s
)[:
-
1
]
l
=
find
(
s
,
'='
)
if
l
>=
0
:
s
=
s
[:
l
]
s
=
translate
(
s
,
tplus
)
####################################
...
...
@@ -374,7 +379,8 @@ def encode_seq(state):
l
=
find
(
state
,
'='
)
if
l
>=
0
:
state
=
state
[:
l
]
state
=
translate
(
state
,
tplus
)
return
state
def
encode_str
(
state
):
...
...
@@ -391,11 +397,12 @@ def encode_str(state):
l
=
find
(
state
,
'='
)
if
l
>=
0
:
state
=
state
[:
l
]
state
=
translate
(
state
,
tplus
)
return
state
def
decode_seq
(
state
):
"Convert an encoded string to a sequence"
state
=
translate
(
state
,
tminus
)
l
=
len
(
state
)
if
l
>
76
:
...
...
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