knockout / tko

🥊 Technical Knockout – The Monorepo for Knockout.js (4.0+)
http://www.tko.io
Other
273 stars 34 forks source link

Remove mustache providers from ko build for backwards compatibility #156

Closed danieldickison closed 2 years ago

danieldickison commented 2 years ago

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.