Skip to content

html_error_template() should escape the exception name and message #142

@sqlalchemy-bot

Description

@sqlalchemy-bot

Migrated issue, originally created by Anonymous

from mako.template import Template
from mako.exceptions import html_error_template

x = Template("""
X:
<% raise Exception('<span style="color:red">Foobar</span>') %>
""")

try:
    x.render()
except:
    # <h3>Exception: <span style="color:red">Foobar</span></h3>
    print html_error_template().render(full=False, css=False)

Attachments: 142.patch

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions