Opened 10 years ago

Last modified 8 months ago

#23424 assigned Bug

Verbatim tag fails to render curly braces — at Version 2

Reported by: stephband Owned by: nobody
Component: Template system Version: dev
Severity: Normal Keywords: verbatim template tag
Cc: Chris Jerdonek, Sarah Boyce Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by stephband)

The {% verbatim %} tag fails to render curly braces under certain conditions - notably when there are two verbatim tags on the same line.

This works:

{% verbatim %}{{{% endverbatim %} – correctly renders as – {{
{% verbatim %}}}{% endverbatim %} – correctly renders as – }}
{% verbatim %}{ {% endverbatim %}text{% verbatim %} }{% endverbatim %} – correctly renders as – { text }

However, this fails:

{% verbatim %}{{% endverbatim %}text{% verbatim %}}{% endverbatim %} – incorrectly renders as – {{% endverbatim %}text{% verbatim %}}
{% verbatim %}% endverbatim %}text{% verbatim %{% endverbatim %} – incorrectly renders as – % endverbatim %}text{% verbatim %
{% verbatim %}{{ {% endverbatim %}text{% verbatim %} }}{% endverbatim %} – incorrectly renders as – {{ {% endverbatim %}text{% verbatim %} }}

(Note that in the second example above the bug reporter is messing with the example as it interprets three curly braces as a code block).

Change History (2)

comment:1 by stephband, 10 years ago

Description: modified (diff)

comment:2 by stephband, 10 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top