#27400 closed Cleanup/optimization (fixed)
Changed in 1.10: {% static %} tag now encodes "#"
| Reported by: | no | Owned by: | Henry Dang |
|---|---|---|---|
| Component: | Documentation | Version: | 1.10 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
As of 1.10, the static tag will now encode "#" as "%23" causing the url to break.
example usecase:
<svg> <use xlink:href="{% static 'path/to/img.svg#whichimg' %}"></use> </svg>
will become:
<svg> <use xlink:href="/static/path/to/img.svg%23whichimg"></use> </svg>
which is incorrect, whereas prior to 1.10, the link would have read "/static/path/to/img.svg#whichimg"
In the very least, this should have been documented as a backward incompatible change.
Change History (5)
comment:1 by , 9 years ago
| Component: | Template system → Documentation |
|---|---|
| Easy pickings: | set |
| Summary: | Regression in 1.10 static tag, now encodes "#" → Changed in 1.10: {% static %} tag now encodes "#" |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
comment:2 by , 9 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
Bisected to cf546e11ac76c8dec527e39ff8ce8249a195ab42. As far as I know, there's no reason to put fragments in the static tag. Accepting as something to mention in the 1.10 release notes.