Skip to content

Commit

Permalink
- Under Python 3, make sure no binary representations end up in the s…
Browse files Browse the repository at this point in the history
…tate string used for the tree tag.
  • Loading branch information
dataflake committed Nov 3, 2017
1 parent 8065190 commit bb50e7d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
3.0b2 (unreleased)
------------------

- Nothing changed yet.
- Under Python 3, make sure no binary representations end up in the
state string used for the tree tag.


3.0b1 (2017-09-15)
Expand Down
5 changes: 5 additions & 0 deletions src/TreeDisplay/TreeTag.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ def tpRenderTABLE(self, id, root_url, url, state, substate, diff, data,

s = encode_str(compress(json.dumps(diff))) # bytes in ASCII enc.

# For rendering the encoded state string in a URL under Python 3,
# we must lose the "b" prefix by decoding
if six.PY3:
s = s.decode('ASCII')

script = md['BASEPATH1']

# Propagate extra args through tree.
Expand Down

0 comments on commit bb50e7d

Please sign in to comment.