#36658: Invalid numeric literal in an {% if %} tag is treated as a variable
----------------------+-------------------------------------------
     Reporter:  Lily  |                     Type:  Bug
       Status:  new   |                Component:  Template system
      Version:  5.2   |                 Severity:  Normal
     Keywords:        |             Triage Stage:  Unreviewed
    Has patch:  0     |      Needs documentation:  0
  Needs tests:  0     |  Patch needs improvement:  0
Easy pickings:  1     |                    UI/UX:  0
----------------------+-------------------------------------------
 I would expect the following template to raise a `TemplateSyntaxError`
 during parsing:

 {{{
 {% if 1.1.1 %}foo{% endif %}
 }}}

 Instead, the `1.1.1` is treated as a variable name, so this will render an
 empty string (or `"foo"` if the context looks like `{"1": {"1": {"1":
 "bar"}}}` or similar).
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36658>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070199d414dd87-165dc6b6-aa72-44b2-8e26-cc81fc645a14-000000%40eu-central-1.amazonses.com.

Reply via email to