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

[TwigBridge] Allow label translation to be safe#25744

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
fabpot merged 1 commit intosymfony:2.7fromMatTheCat:safe_label
Jan 30, 2018
Merged

[TwigBridge] Allow label translation to be safe#25744

fabpot merged 1 commit intosymfony:2.7fromMatTheCat:safe_label
Jan 30, 2018

Conversation

@MatTheCat
Copy link
Contributor

QA
Branch?2.7
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?~
Fixed tickets~
LicenseMIT
Doc PR~

After overridingTranslationExtension'strans filter to make it safe I noticed form labels were still escaped because oflabel in

{{translation_domainissame as(false)?label:label|trans({},translation_domain) }}

Replacing this ternary withif/else allowstrans return to be safe.

WDYT?

@MatTheCatMatTheCat changed the base branch frommaster to2.7January 10, 2018 12:28
@nicolas-grekasnicolas-grekas added this to the2.7 milestoneJan 10, 2018
@MatTheCat
Copy link
ContributorAuthor

Guess I'll have to override the form theme.

@MatTheCat
Copy link
ContributorAuthor

Well I'd like to hear something though.

@MatTheCatMatTheCat reopened thisJan 24, 2018
@MatTheCat
Copy link
ContributorAuthor

Ping@nicolas-grekas you're the only one who interacted with this PR.

@fabpot
Copy link
Member

Thank you@MatTheCat.

@fabpotfabpot merged commit041c42d intosymfony:2.7Jan 30, 2018
fabpot added a commit that referenced this pull requestJan 30, 2018
This PR was merged into the 2.7 branch.Discussion----------[TwigBridge] Allow label translation to be safe| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | ~| Fixed tickets | ~| License       | MIT| Doc PR        | ~After overriding `TranslationExtension`'s `trans` filter to make it safe I noticed form labels were still escaped because of `label` in```twig{{ translation_domain is same as(false) ? label : label|trans({}, translation_domain) }}```Replacing this ternary with `if`/`else` allows `trans` return to be safe.WDYT?Commits-------041c42d Allow trans filter to be safe
@MatTheCatMatTheCat deleted the safe_label branchApril 30, 2018 09:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

2.7

Development

Successfully merging this pull request may close these issues.

4 participants

@MatTheCat@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp