Mercurial > p > roundup > code
comparison roundup/scripts/roundup_server.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 | 1a835db41674 |
| children | f822a91b3778 |
comparison
equal
deleted
inserted
replaced
| 5836:75586a0c26c0 | 5837:883c9e90b403 |
|---|---|
| 55 try: | 55 try: |
| 56 from OpenSSL import SSL | 56 from OpenSSL import SSL |
| 57 except ImportError: | 57 except ImportError: |
| 58 SSL = None | 58 SSL = None |
| 59 | 59 |
| 60 try: | 60 from roundup.anypy.html import html_escape |
| 61 from html import escape as html_escape # python 3 | |
| 62 except ImportError: | |
| 63 from cgi import escape as html_escape # python 2 fallback | |
| 64 | 61 |
| 65 # python version check | 62 # python version check |
| 66 from roundup import configuration, version_check | 63 from roundup import configuration, version_check |
| 67 from roundup import __version__ as roundup_version | 64 from roundup import __version__ as roundup_version |
| 68 | 65 |
