comparison roundup/cgi/actions.py @ 5837:883c9e90b403

Fix problem with cgi.escape being depricated a different way. This way uses anypy and is cleaner. Also fixes incorrect/incomplete change that resulted in escaped in TAL generated by TALInterpreter.py. The escaped quotes break javascript etc. defined using tal string: values. TODO: add test cases for TAL. This wouldn't have snuck through for a month if we had good coverage of that library.
author John Rouillard <rouilj@ieee.org>
date Sat, 06 Jul 2019 13:12:58 -0400
parents bd6d41f21a5a
children 5d0873a4de4a
comparison
equal deleted inserted replaced
5836:75586a0c26c0 5837:883c9e90b403
9 from roundup.exceptions import Reject, RejectRaw 9 from roundup.exceptions import Reject, RejectRaw
10 from roundup.anypy import urllib_ 10 from roundup.anypy import urllib_
11 from roundup.anypy.strings import StringIO 11 from roundup.anypy.strings import StringIO
12 import roundup.anypy.random_ as random_ 12 import roundup.anypy.random_ as random_
13 13
14 try: 14 from roundup.anypy.html import html_escape
15 from html import escape as html_escape # python 3
16 except ImportError:
17 from cgi import escape as html_escape # python 2 fallback
18 15
19 import time 16 import time
20 from datetime import timedelta 17 from datetime import timedelta
21 18
22 # Also add action to client.py::Client.actions property 19 # Also add action to client.py::Client.actions property

Roundup Issue Tracker: http://roundup-tracker.org/