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

Use JS escaping for {ts} calls in a JS context #22348

Merged
merged 1 commit into from
Dec 31, 2021

Conversation

braders
Copy link
Contributor

@braders braders commented Dec 31, 2021

Overview

Use JS escaping for {ts} calls in a JS context.

Before

{ts} was used within a <script> context without the proper escaping strategy. This can cause issues with certain translations.

After

The risk of translations breaking the JS code is reduced.

Comments

This stems from my earlier pull request #22315, where @totten pulled me up on making this very mistake. I was sure I'd seen {ts} calls in JS code without escaping before, so this tidies up the remaining instances to stop others copying this bad practice in future (like I did!)

@civibot
Copy link

civibot bot commented Dec 31, 2021

(Standard links)

@civibot civibot bot added the master label Dec 31, 2021
@totten
Copy link
Member

totten commented Dec 31, 2021

jenkins, test this please

@totten
Copy link
Member

totten commented Dec 31, 2021

Changes read well. For r-run, I spot-checked a few of the modified screens, and they looked good.

@colemanw colemanw merged commit e3859ce into civicrm:master Dec 31, 2021
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.

3 participants