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

Remove mustache providers from ko build for backwards compatibility #156

Merged
merged 1 commit into from
Jan 9, 2022

Conversation

danieldickison
Copy link
Collaborator

Because knockout didn’t have mustache/handlebar style interpolation, there can exist templates that contain arbitrary and unrelated {{...}} in text and attributes, which break under tko. In our case, we had some server-side rendered templates that injected (html-escaped) user-provided text, that would subsequently by bound with knockout, and on rare occasion the user-provided text included mustaches that would be parsed as bindings and fail.

For this reason, I propose leaving TextMustacheProvider and AttributeMustacheProvider out of the MultiProvider for the knockout compat build as in this PR.

Copy link
Member

@brianmhunt brianmhunt left a comment

Choose a reason for hiding this comment

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

Good catch, I agree with this. Thanks @danieldickison !

Please feel free to merge at your pleasure!

@brianmhunt brianmhunt merged commit f16b3c4 into knockout:main Jan 9, 2022
@danieldickison danieldickison deleted the ko-nostache branch January 9, 2022 18:15
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.

2 participants