view roundup/anypy/html.py @ 7068:bc06bad26872

Remove dead code for handling LogoutAction. Dead code starts wih: ''' # I think now that LogoutAction redirects to # self.base ([tracker] web parameter in config.ini), # this code is not needed. However I am keeping it # around in case it has to come back to life. # Delete if this is still around in 3/2018. # rouilj 3/2017. # # Note using this code may cause a CSRF Login vulnerability. # Handle the case where user logs out and tries to # log in again in same window. # The csrf token for the login button is associated # with the prior login, so it will not validate.
author John Rouillard <rouilj@ieee.org>
date Wed, 23 Nov 2022 22:25:34 -0500
parents ff57db595a58
children 7f888f046857
line wrap: on
line source

try:
    from html import escape as html_escape_  # python 3

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

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