#23424: Verbatim tag fails to render curly braces
-------------------------------------+-------------------------------------
     Reporter:  stephband            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Template system      |                  Version:  1.7-rc-2
     Severity:  Normal               |               Resolution:
     Keywords:  verbatim template    |             Triage Stage:
  tag                                |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Description changed by stephband:

Old description:

> 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 %} }}

New description:

 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).

--

--
Ticket URL: <https://code.djangoproject.com/ticket/23424#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.ca9296d2e8ab64c33c0b4f6711b2be7f%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to