node.js - How to enable autoescape globally in twig.js? -


i'm using express.js , twig.js 0.9.5 , i'd enable autoescape variables in every template. i've found this page telling should enabled default 0.9.0, doesn't seem work. how configure twig escape unless specified otherwise?

express.js passes whatever in twig options setting twig, enable autoescape views, use:

var app = express(); app.set('twig options', {   autoescape: true }); 

Comments

Popular posts from this blog

javascript - Knockout pushing observable and computed data to an observable array -

c# - Update a combobox from a presenter (MVP) -

'hasOwnProperty' in javascript -