[Django] #35280: iriencode example incorrect

13 views
Skip to first unread message

Django

unread,
Mar 7, 2024, 7:07:22 AM3/7/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-----------------------------------------+------------------------
Reporter: minusf | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-----------------------------------------+------------------------
https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#iriencode

If value is "?test=1&me=2", the output will be "?test=1&me=2".

This is not the case as by default "&" is a safe character for iriencode:
https://github.com/django/django/blob/main/django/utils/encoding.py#L135.

It is urlencode that does that conversion. iriencode is more for non-ascii
characters in my understanding, and using both at the same time is
supported:
{{{
value|urlencode|iriencode
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35280>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 7, 2024, 7:39:30 AM3/7/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+------------------------------------
Reporter: minusf | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 5.0
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 Mariusz Felisiak):

* stage: Unreviewed => Accepted

Comment:

Good catch, we could use an example from the docstring, `'/I ♥ Django/`.
Would you like to prepare a patch?
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:1>

Django

unread,
Mar 8, 2024, 1:19:58 AM3/8/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+------------------------------------
Reporter: minusf | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 5.0
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
-------------------------------+------------------------------------
Comment (by Can Huynh):

I would love to help if @minusf couldn't allocate the time. Lmk!
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:2>

Django

unread,
Mar 8, 2024, 3:57:25 AM3/8/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+------------------------------------
Reporter: minusf | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 5.0
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
-------------------------------+------------------------------------
Comment (by minusf):

there is no monopoly on pull requests, go ahead Can :D
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:3>

Django

unread,
Mar 8, 2024, 9:59:35 PM3/8/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: assigned
Component: Documentation | Version: 5.0
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 Can Huynh):

* owner: nobody => Can Huynh
* status: new => assigned

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

Django

unread,
Mar 9, 2024, 12:36:58 AM3/9/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: assigned
Component: Documentation | Version: 5.0
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
-------------------------------+-------------------------------------
Comment (by Can Huynh):

Thank you! Preparing the patch now.

Replying to [comment:3 minusf]:
> there is no monopoly on pull requests, go ahead Can :D
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:5>

Django

unread,
Mar 9, 2024, 9:12:58 AM3/9/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
-------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* has_patch: 0 => 1
* needs_better_patch: 0 => 1

Comment:

[https://github.com/django/django/pull/17959 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:6>

Django

unread,
Mar 10, 2024, 9:58:53 AM3/10/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: assigned
Component: Documentation | Version: 5.0
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin

--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:7>

Django

unread,
Mar 10, 2024, 1:50:10 PM3/10/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: closed
Component: Documentation | Version: 5.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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

Comment:

In [changeset:"a7baa874d8452859060ecd28c83cecd566f756e3" a7baa87]:
{{{#!CommitTicketReference repository=""
revision="a7baa874d8452859060ecd28c83cecd566f756e3"
Fixed #35280 -- Improved iriencode filter example in docs.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:8>

Django

unread,
Mar 10, 2024, 1:50:29 PM3/10/24
to django-...@googlegroups.com
#35280: iriencode example incorrect
-------------------------------------+-------------------------------------
Reporter: minusf | Owner: Can Huynh
Type: Bug | Status: closed
Component: Documentation | Version: 5.0
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"ef23305a19c39b26bc25e2df68355743652e77ab" ef23305]:
{{{#!CommitTicketReference repository=""
revision="ef23305a19c39b26bc25e2df68355743652e77ab"
[5.0.x] Fixed #35280 -- Improved iriencode filter example in docs.

Backport of a7baa874d8452859060ecd28c83cecd566f756e3 from main
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35280#comment:9>
Reply all
Reply to author
Forward
0 new messages