Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(compiler): i18n - trim whitespace from i18n metadata #34154

Closed

Conversation

@petebacondarwin
Copy link
Member

petebacondarwin commented Nov 29, 2019

Fixes #34147

Copy link
Contributor

AndrewKushnir left a comment

Looks great, but this change as is might lead to some minor breaking changes. So the proposal is to trim id part only.

packages/compiler/src/i18n/extractor_merger.ts Outdated Show resolved Hide resolved
@petebacondarwin petebacondarwin force-pushed the petebacondarwin:i18n-whitespace branch 3 times, most recently from 9073089 to e863eeb Dec 2, 2019
@petebacondarwin petebacondarwin requested a review from AndrewKushnir Dec 2, 2019
Copy link
Contributor

AndrewKushnir left a comment

LGTM 👍

@AndrewKushnir

This comment has been minimized.

Copy link
Contributor

AndrewKushnir commented Dec 2, 2019

It is possible for HTML formatters to add whitespace
around the content of `i18n` attribute values. This can
make the meaning and custom ids brittle to simple
whitespace formatting.

This commit ensures that the metadata string extracted
from HTML `i18n` attributes is trimmed before being parsed
into meaning, description and custom id.
@petebacondarwin petebacondarwin force-pushed the petebacondarwin:i18n-whitespace branch from e863eeb to 6818261 Dec 3, 2019
mhevery added a commit that referenced this pull request Dec 3, 2019
It is possible for HTML formatters to add whitespace
around the content of `i18n` attribute values. This can
make the meaning and custom ids brittle to simple
whitespace formatting.

This commit ensures that the metadata string extracted
from HTML `i18n` attributes is trimmed before being parsed
into meaning, description and custom id.

PR Close #34154
@mhevery mhevery closed this in f6a6f26 Dec 3, 2019
mhevery added a commit that referenced this pull request Dec 3, 2019
mhevery added a commit that referenced this pull request Dec 3, 2019
It is possible for HTML formatters to add whitespace
around the content of `i18n` attribute values. This can
make the meaning and custom ids brittle to simple
whitespace formatting.

This commit ensures that the metadata string extracted
from HTML `i18n` attributes is trimmed before being parsed
into meaning, description and custom id.

PR Close #34154
@petebacondarwin petebacondarwin deleted the petebacondarwin:i18n-whitespace branch Dec 4, 2019
@angular-automatic-lock-bot

This comment has been minimized.

Copy link

angular-automatic-lock-bot bot commented Jan 4, 2020

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.