-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Prevent execution of script in knockout #2570
Comments
It has nothing to do with knockout itself. It is normal browser behavior. If you set the the "html" Attribute the string will be rendered in the DOM. You should use the text binding. |
<template><div>Hello World<script>console.log('hi there');</script></div></template> This doesn't. |
@the-djmaze but then it is a template. Isn't it then a complete different use case? I think there is no probleme here. We don't know what @akv31 want. This issue should be closed. |
knockout/dist/knockout.debug.js
Line 1008 in aad7121
While debugging. My html at this point is
The browser renders 'Hello World' and also executes the script. How can we prevent the script from executing.
The text was updated successfully, but these errors were encountered: