view roundup/anypy/html.py @ 8296:4d3b371ed543

fix: issue1895197 - translated help texts in admin.py not displayed correctly. Adjust the technique used to remove the translated "Usage:" prefix from the printed line. Support Chinese (zh) as well. Add coding marker so I don't have to modify the tests to skip the ones that touch the dmin module.
author John Rouillard <rouilj@ieee.org>
date Mon, 20 Jan 2025 15:21:56 -0500
parents 7f888f046857
children
line wrap: on
line source

try:
    from html import escape as html_escape_  # python 3

    def html_escape(string, quote=False):
        # html_escape under python 3 sets quote to true by default
        # make it python 2 compatible
        return html_escape_(string, quote=quote)
except ImportError:
    # python 2 fallback
    from cgi import escape as html_escape  # noqa: F401

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