-
-
Notifications
You must be signed in to change notification settings - Fork 659
Avoid using new Function() #47
Comments
For any production use, my recommendation is to make use of compiled templates. |
Can you provide an example on how to use the "compiled template" to produce javascript and what the output looks like? Trying your example only showed me this:
It opened up Atom and showed that Greek to me. Or, c:\Users\bob\node\tmpl>tmpl.js index.html > tmpl.js |
Hi @oliverbob, Have you followed the guide here? |
Hi Sebastian, It is the result of following the tutorial/documentation you have provided. I followed the guide step by step and installed the template like:
But may be this is an issue on node. I'm using the latest version on windows. Can you provide a concrete example of how to use the tmpl.js compiler in the wiki? Thank you very much, Oliver |
Sorry I don't provide support to run this on Windows. However if you want to figure out how to make this work under Windows and would like to write a guide with step-by-step instructions, I'd gladly add a link to the Wiki. |
Ok, I will try this on puppy linux. |
The
new Function(...)
, user here: https://github.com/blueimp/JavaScript-Templates/blob/master/js/tmpl.js#L24is a bad practice, and disabled by default if using Content Security Policy (see here)
Can this be replaced? Otherwise who uses CSP must add
unsafe-eval
to use this library, allowing potential secutiry vulnerabilities.The text was updated successfully, but these errors were encountered: