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

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

Command prompt result in label. Python 2.7 -