#36758: Template parser errors when using whitespace around pipe for certain
filters
-------------------------------------+-------------------------------------
Reporter: Stephen Skett | Owner: (none)
Type: Uncategorized | Status: new
Component: Template system | Version: 4.2
Severity: Normal | Resolution:
Keywords: template, filter, | Triage Stage:
pipe, whitespace, divisibleby, | Unreviewed
center |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ahmed Asar):
Hi Stephen,
Thanks for the detailed report. I was able to reproduce the issue with
divisibleby and center when whitespace is added around the | — while other
filters (like date) handle it fine. This does look like an inconsistency
in the template parser.
Before proceeding, could you confirm which Django version you're using
(exact version, e.g. 4.2.11 or main branch)? Also, would you be open to me
investigating this further and potentially submitting a fix?
I’m happy to help, but I don’t want to step on your toes if you’d like
to work on it yourself.
Best regards!
--
Ticket URL: <
https://code.djangoproject.com/ticket/36758#comment:2>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.