Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[TwigBundle] Deprecate option "autoescape", use "autoescape_service[_method]" instead#46052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@nicolas-grekas
Copy link
Member

@nicolas-grekasnicolas-grekas commentedApr 15, 2022
edited
Loading

QA
Branch?6.1
Bug fix?no
New feature?no
Deprecations?yes
Tickets-
LicenseMIT
Doc PR-

This option is a foot-gun, even the tests are wrong sincetrue doesn't mean anything for it.
Also because eg disabling auto-escaping breaks forms / emails, which expect anhtml escaping strategy.

I therefore propose to deprecate optionautoescape and to keepautoescape_service +autoescape_service_method, which are more capable, and will require ppl to think twice before returningfalse.

For ppl that need a custom escaping strategy, you'll likely want to use/take inspiration fromFileExtensionEscapingStrategy::guess() in your implementation.

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@stofstofstof approved these changes

@ycerutoycerutoyceruto approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@fabpot@stof@yceruto@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp