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

Apply escaping to JS translation strings. #5479

Merged
merged 1 commit into from
Aug 2, 2019

Conversation

gasman
Copy link
Collaborator

@gasman gasman commented Aug 1, 2019

Fixes #5477

Rather than inserting translations individually into the template via the {% trans %} tag (which fails to apply Javascript escaping), write out the full dictionary in one go via json.dumps.

@squash-labs
Copy link

squash-labs bot commented Aug 1, 2019

Manage this branch in Squash

Test this branch here: https://gasmanfixjs-translation-escapi-8h0sr.squash.io

Copy link
Contributor

@jonnyscholes jonnyscholes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@gasman gasman merged commit 0514942 into wagtail:master Aug 2, 2019
@gasman
Copy link
Collaborator Author

gasman commented Aug 2, 2019

Merged in 0514942 (master) / e03fa25 (stable/2.6.x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in Hungarian translation
2 participants