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: unescape html in Trans #1426

Merged
merged 2 commits into from
Dec 10, 2021
Merged

fix: unescape html in Trans #1426

merged 2 commits into from
Dec 10, 2021

Conversation

cuyl
Copy link
Contributor

@cuyl cuyl commented Dec 7, 2021

fixes #1424

@coveralls
Copy link

coveralls commented Dec 7, 2021

Coverage Status

Coverage remained the same at 96.057% when pulling 985f730 on cuyl:master into 9968b8d on i18next:master.

@jamuhl jamuhl requested a review from adrai December 7, 2021 08:27
@jamuhl
Copy link
Member

jamuhl commented Dec 7, 2021

Not sure if this should be an optional behaviour - can't really guess if there are side effects on existing projects? @adrai what do you think?

@cuyl
Copy link
Contributor Author

cuyl commented Dec 7, 2021

The content should escape when extracting Trans content, but I do not use saveMissing.

It may be a breaking change unless you can share translation memory between escaped and unescaped versions.

@adrai
Copy link
Member

adrai commented Dec 7, 2021

my gut feeling says, this should only be introduced with a new Trans prop (and/or react option) that enables this

@adrai
Copy link
Member

adrai commented Dec 10, 2021

@cuyl can you adapt the PR accordingly?

@cuyl
Copy link
Contributor Author

cuyl commented Dec 10, 2021

@adrai Sure, please check it out

@adrai adrai requested review from jamuhl and removed request for adrai December 10, 2021 11:21
@adrai
Copy link
Member

adrai commented Dec 10, 2021

@jamuhl lgtm (maybe also a react init option?)

@jamuhl
Copy link
Member

jamuhl commented Dec 10, 2021

@adrai lgtm...guess react init option could be added in a later stage if really used that often?

@jamuhl jamuhl merged commit fdfd592 into i18next:master Dec 10, 2021
@jamuhl
Copy link
Member

jamuhl commented Dec 10, 2021

published in react-i18next@11.15.0

@adrai adrai mentioned this pull request Jul 3, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trans should allow html encoded character like < & >
4 participants