comparison roundup/cgi/client.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 8f50e00532e7
children fd015c4c6c23
comparison
equal deleted inserted replaced
5836:75586a0c26c0 5837:883c9e90b403
21 from OpenSSL.SSL import SysCallError 21 from OpenSSL.SSL import SysCallError
22 except ImportError: 22 except ImportError:
23 class SysCallError(Exception): 23 class SysCallError(Exception):
24 pass 24 pass
25 25
26 try: 26 from roundup.anypy.html import html_escape
27 from html import escape as html_escape # python 3
28 except ImportError:
29 from cgi import escape as html_escape # python 2 fallback
30 27
31 from roundup import roundupdb, date, hyperdb, password 28 from roundup import roundupdb, date, hyperdb, password
32 from roundup.cgi import templating, cgitb, TranslationService 29 from roundup.cgi import templating, cgitb, TranslationService
33 from roundup.cgi import actions 30 from roundup.cgi import actions
34 from roundup.exceptions import LoginError, Reject, RejectRaw, \ 31 from roundup.exceptions import LoginError, Reject, RejectRaw, \

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