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

BCTHEME-276: Add option to escape values in inject helper #233

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

bdav87
Copy link

@bdav87 bdav87 commented Apr 5, 2021

Similar to bigcommerce/paper-handlebars#138

What

Adding an optional param to the inject helper so developers can choose to escape injected values.

Why

To prevent XSS when user-writeable fields are injected with the inject helper. By making this an optional argument, developers can opt in to escaping values, and existing theme customizations should not be impacted.

Testing

Added tests and ran all unit tests
Started Stapler locally with this version of Paper and compared injected values in console log with custom Cornerstone.

@bdav87 bdav87 requested a review from junedkazi April 5, 2021 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant