twig.js icon indicating copy to clipboard operation
twig.js copied to clipboard

Turn on autoescape by default

Open evgenius opened this issue 9 years ago • 6 comments

evgenius avatar Mar 15 '15 11:03 evgenius

+1

brunowego avatar Mar 19 '15 18:03 brunowego

Big +1 for this.

I'm very happy autoescape functionality is already implemented. I am however curious about the reason as to why this feature hasn't been enabled by default.

rthijssen avatar Jun 24 '15 05:06 rthijssen

+1

Kampfkarren avatar Jan 31 '16 22:01 Kampfkarren

We will switch this on for the 0.9 milestone.

dave-irvine avatar Apr 19 '16 15:04 dave-irvine

This does not work on twig 0.9.5:

twig = require 'twig'
template = twig.twig
	data: "test {{test}}"
console.log template.render
	test: "<h1>wtf</h1>"
# prints: test <h1>wtf</h1>

roddik avatar Apr 07 '17 10:04 roddik

Would just like to add to this. Was rather surprised to see that it's not on by default

deanc avatar Nov 29 '20 16:11 deanc