Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12069 closed (duplicate)

The {% url %} parser silently ignores anything after an "as varname" clause

Reported by: emulbreh Owned by: jeffschenck
Component: Template system Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: no
Easy pickings: UI/UX:


>>> Template("{% url view foo as bar f,_@/2[]$ %}")
<django.template.Template object at 0xe1fcf0>

This should raise TemplateSyntaxError.

Attachments (1)

url_parser_syntax.diff (719 bytes) - added by jeffschenck 6 years ago.
Patch for url template tag parsing

Download all attachments as: .zip

Change History (6)

comment:1 Changed 6 years ago by russellm

  • milestone set to 1.2
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

See also #12068

Changed 6 years ago by jeffschenck

Patch for url template tag parsing

comment:2 Changed 6 years ago by jeffschenck

  • Has patch set
  • Owner changed from nobody to jeffschenck
  • Status changed from new to assigned

comment:3 Changed 6 years ago by SmileyChris

  • Needs tests set

This would also be fixed by my patch in #12945.

comment:4 Changed 6 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from assigned to closed

Since #12945 would fix this and is on the 1.2 milestone as a regression from previous behavior, I'm going to close in favor of that.

comment:5 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top