Re: [Django] #6135: Introduce a short-cut for template filters that has needs_autoescape = True

14 views
Skip to first unread message

Django

unread,
Aug 30, 2011, 9:44:45 AM8/30/11
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------------+---------------------------------
Reporter: anonymous | Owner: nobody
Type: New feature | Status: new
Milestone: | Component: Template system
Version: SVN | Severity: Normal
Resolution: | Keywords: autoescape
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
---------------------------------------+---------------------------------
Changes (by jezdez):

* ui_ux: => 0
* easy: => 0


Comment:

#16726 was a dupe.

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

Django

unread,
Oct 31, 2019, 9:50:06 PM10/31/19
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------

Reporter: anonymous | Owner: nobody
Type: New feature | Status: new
Component: Template system | Version: master

Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Johannes Hoppe):

* needs_better_patch: 0 => 1
* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:9>

Django

unread,
Mar 23, 2020, 4:22:05 PM3/23/20
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+----------------------------------------
Reporter: anonymous | Owner: Seth Thoburn
Type: New feature | Status: assigned

Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Seth Thoburn):

* owner: nobody => Seth Thoburn
* needs_better_patch: 1 => 0
* status: new => assigned
* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:10>

Django

unread,
Oct 25, 2020, 2:25:13 PM10/25/20
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+----------------------------------------
Reporter: anonymous | Owner: Seth Thoburn
Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Jacob Walls):

* has_patch: 0 => 1


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:11>

Django

unread,
Oct 27, 2020, 7:27:27 AM10/27/20
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+----------------------------------------
Reporter: anonymous | Owner: Seth Thoburn
Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
---------------------------------+----------------------------------------
Changes (by Carlton Gibson):

* needs_docs: 0 => 1


* needs_tests: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:12>

Django

unread,
Feb 12, 2021, 1:40:51 AM2/12/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)

Type: New feature | Status: new
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by David Smith):

* owner: Seth Thoburn => (none)
* status: assigned => new
* easy: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:13>

Django

unread,
Feb 14, 2021, 9:02:08 AM2/14/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner:
| AbhigyaShridhar

Type: New feature | Status: assigned
Component: Template system | Version: master
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by AbhigyaShridhar):

* owner: (none) => AbhigyaShridhar


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:14>

Django

unread,
Aug 14, 2021, 10:21:02 AM8/14/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: (none)
Type: New feature | Status: new
Component: Template system | Version: dev

Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by David Smith):

* owner: AbhigyaShridhar => (none)


* status: assigned => new


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:15>

Django

unread,
Aug 20, 2021, 4:35:49 AM8/20/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy

Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Chinmoy):

* owner: (none) => Chinmoy


* status: new => assigned


Comment:

This is a rather old ticket. But the patch was not finalized. It's still
open to work right?

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:16>

Django

unread,
Aug 20, 2021, 3:30:37 PM8/20/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Chinmoy):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:17>

Django

unread,
Aug 20, 2021, 3:31:42 PM8/20/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Chinmoy):

* needs_docs: 1 => 0


* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:18>

Django

unread,
Aug 31, 2021, 11:10:08 AM8/31/21
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Chinmoy):

Can someone have a look at the PR. The doc tests seem to complain about a
spelling mistake.

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:19>

Django

unread,
Jan 11, 2022, 2:51:10 AM1/11/22
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Ayush Joshi):

* needs_better_patch: 0 => 1


Comment:

Replying to [comment:19 Chinmoy]:


> Can someone have a look at the PR. The doc tests seem to complain about
a spelling mistake.

I requested some changes there. From my side the doc test is unable to
download the logs so I can't help in the failing action.

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:20>

Django

unread,
Jan 15, 2022, 4:59:08 AM1/15/22
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Chinmoy):

* needs_better_patch: 1 => 0


Comment:

I've applied the necessary changes.

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:21>

Django

unread,
Mar 5, 2022, 6:22:14 AM3/5/22
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: closed

Component: Template system | Version: dev
Severity: Normal | Resolution: wontfix

Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by Carlton Gibson):

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


--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:24>

Django

unread,
Mar 5, 2022, 6:22:15 AM3/5/22
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned

Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Carlton Gibson):

I think we should `wontfix` this. Copying my
[https://github.com/django/django/pull/14784#pullrequestreview-898610549
comment from the PR]:

> I have to say that after 14 years I think we should probably close this
as wontfix. 😬
>
> I think the new decorator is likely to cause more confusion that it'll
solve.
>
> Specifically, it's only going to be appropriate for filters already
marked @stringfilter — that's fine, in theory, but that's not documented
at all — and it's going to be anything but clear to document — and we're
going to see a whole load of reports saying @autoescape_aware doesn't work
with my filter.
>
> There's already a way to do this, and the proposed decorator isn't
sufficiently robust to cover all cases.
>
> Also, as evidenced by those 14 years, I'm not convinced the saving is
all that great:
>
> if autoescape:
> esc = conditional_escape
> else:
> esc = lambda x: x
> … OK, yes. It's slightly repetitive. If it really bothered me I could
write a make_escape() factory function to remove the duplication. But, on
the other hand, it's clear: there's no question of what the behaviour is,
and I don't have to go looking into the source to see how the parameters
get applied.
>
> Summary, I'm not at all convinced the proposed decorator pays its way.
> 🤔

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:22>

Django

unread,
Mar 5, 2022, 6:27:04 AM3/5/22
to django-...@googlegroups.com
#6135: Introduce a short-cut for template filters that has needs_autoescape = True
---------------------------------+------------------------------------
Reporter: anonymous | Owner: Chinmoy
Type: New feature | Status: assigned
Component: Template system | Version: dev
Severity: Normal | Resolution:
Keywords: autoescape | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by Mariusz Felisiak):

> I think we should `wontfix` this.

Agreed.

--
Ticket URL: <https://code.djangoproject.com/ticket/6135#comment:23>

Reply all
Reply to author
Forward
0 new messages