Opened 18 years ago
Last modified 17 years ago
#4446 closed
spaceless fails under specific condition of subtemplate — at Version 2
Reported by: | shwag < > | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Template system | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
The {% spaceless %} filter is not filtering out carriage returns in sub-templates under certain conditions.
{% spaceless %} {% include "something.html" %} {% endspaceless %}
and in something.html
{% if test %} {% load humanize %} <a name="thing"></a>
will leave one carriage return for each block tag.
A valid work around is.
<a name="thing"></a> {% if test %} {% load humanize %}
Once valid html is before the tags, the carriage returns are no longer generated.
Change History (2)
comment:1 by , 18 years ago
Component: | Uncategorized → Template system |
---|---|
Owner: | changed from | to
comment:2 by , 18 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
Fixed description formatting so that non-code sentences wrap.