comparison roundup/cgi/wsgi_handler.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 edd9e2c67785
children 40f5b20d1e70
comparison
equal deleted inserted replaced
5836:75586a0c26c0 5837:883c9e90b403
6 6
7 import os 7 import os
8 import cgi 8 import cgi
9 import weakref 9 import weakref
10 10
11 try: 11 from roundup.anypy.html import html_escape
12 from html import escape as html_escape # python 3
13 except ImportError:
14 from cgi import escape as html_escape # python 2 fallback
15 12
16 import roundup.instance 13 import roundup.instance
17 from roundup.cgi import TranslationService 14 from roundup.cgi import TranslationService
18 from roundup.anypy import http_ 15 from roundup.anypy import http_
19 from roundup.anypy.strings import s2b, bs2b 16 from roundup.anypy.strings import s2b, bs2b

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