#32710: static template tag converts '?' to '%3F'
-------------------------------------+-------------------------------------
Reporter: Adrian | Owner: nobody
Garcia |
Type: Bug | Status: new
Component: Template | Version: 3.1
system |
Severity: Normal | Keywords: static template
Triage Stage: | Has patch: 1
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
As the title suggests, the static template tag converts all question marks
to '%3F' which still seems to work, but I don't think this is intended.
Template code:
{{{
<script src="{% static
'bootstrap/js/bootstrap.bundle.min.js?test'%}"></script>
}}}
Output is:
{{{
<script src="/js/bootstrap.bundle.min.js%3Ftest"></script>
}}}
I followed the execution path and the replacement happens in
{{{django.utils.encoding.filepath_to_uri}}} when {{{urllib.parse.quote}}}
is called. I think '?' should be denoted as a safe character because
otherwise, the function will replace it with a byte representation
--
Ticket URL: <https://code.djangoproject.com/ticket/32710>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.e74390de1446177978cb85c61caf89e7%40djangoproject.com.