Opened 18 years ago
Closed 17 years ago
#4171 closed (fixed)
Forbid newlines in tags
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Newlines must be forbidden in tags. If tag contains newline (\n
or \r
) it should be processed as ordinary text.
Inspired by Templates: short comments {##} eats text
Attachments (1)
Change History (4)
by , 18 years ago
Attachment: | forbide_newlines_in_tags.diff added |
---|
comment:1 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
This doesn't work for templates that extend other templates. Simple test case:
A.html:
{% extends "B.html" %} {# foo #}
B.html:
<h1>hello</h1>
This incorrectly hides {# foo #}.
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
That doesn't show anything - {% extends %}
only replaces parent {% block %}
s with ones in the child template so it hides any text you'd put outside a block tag.
Note:
See TracTickets
for help on using tickets.
(In [5104]) Fixed #4164, #4171 -- Reworked some of the template lexer logic to ensure we
don't get caught out by a couple of corner cases.