[Django] #27400: Regression in 1.10 static tag, now encodes "#"

11 views
Skip to first unread message

Django

unread,
Oct 28, 2016, 12:34:54 PM10/28/16
to django-...@googlegroups.com
#27400: Regression in 1.10 static tag, now encodes "#"
-------------------------------------------+------------------------
Reporter: Richard Eames | Owner: nobody
Type: Uncategorized | Status: new
Component: Template system | Version: 1.10
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------------+------------------------
As of 1.10, the static tag will now encode "#" as "%23" causing the url to
break.

example usecase:
{{{#!html+django

<svg>
<use xlink:href="{% static 'path/to/img.svg#whichimg' %}"></use>
</svg>
}}}
will become:
{{{#!html+django

<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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27400>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 28, 2016, 2:51:19 PM10/28/16
to django-...@googlegroups.com
#27400: Changed in 1.10: {% static %} tag now encodes "#"
--------------------------------------+------------------------------------

Reporter: Richard Eames | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham):

* type: Uncategorized => Cleanup/optimization
* stage: Unreviewed => Accepted
* component: Template system => Documentation
* easy: 0 => 1


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/27400#comment:1>

Django

unread,
Oct 28, 2016, 7:47:33 PM10/28/16
to django-...@googlegroups.com
#27400: Changed in 1.10: {% static %} tag now encodes "#"
-------------------------------------+-------------------------------------
Reporter: Richard Eames | Owner: Henry
Type: | Dang
Cleanup/optimization | Status: assigned

Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Henry Dang):

* owner: nobody => Henry Dang
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/27400#comment:2>

Django

unread,
Oct 31, 2016, 3:38:53 PM10/31/16
to django-...@googlegroups.com
#27400: Changed in 1.10: {% static %} tag now encodes "#"
-------------------------------------+-------------------------------------
Reporter: Richard Eames | Owner: Henry
Type: | Dang
Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.10
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/7452 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/27400#comment:3>

Django

unread,
Oct 31, 2016, 4:11:05 PM10/31/16
to django-...@googlegroups.com
#27400: Changed in 1.10: {% static %} tag now encodes "#"
-------------------------------------+-------------------------------------
Reporter: Richard Eames | Owner: Henry
Type: | Dang
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"9c2e1ad6a5f0ca98d68df7afdb13715921949c5a" 9c2e1ad]:
{{{
#!CommitTicketReference repository=""
revision="9c2e1ad6a5f0ca98d68df7afdb13715921949c5a"
Fixed #27400 -- Documented {% static %} encoding change in 1.10.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27400#comment:4>

Django

unread,
Oct 31, 2016, 4:11:17 PM10/31/16
to django-...@googlegroups.com
#27400: Changed in 1.10: {% static %} tag now encodes "#"
-------------------------------------+-------------------------------------
Reporter: Richard Eames | Owner: Henry
Type: | Dang
Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.10
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"157607cb6c8c5de4dba1aada97b21597e0a966e0" 157607cb]:
{{{
#!CommitTicketReference repository=""
revision="157607cb6c8c5de4dba1aada97b21597e0a966e0"
[1.10.x] Fixed #27400 -- Documented {% static %} encoding change in 1.10.

Backport of 9c2e1ad6a5f0ca98d68df7afdb13715921949c5a from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27400#comment:5>

Reply all
Reply to author
Forward
0 new messages