carlitoplatanito / gulp-nunjucks-render

[Gulp](https://github.com/wearefractal/gulp) plugin to render [Nunjucks](http://mozilla.github.io/nunjucks/) templates
149 stars 33 forks source link

how to disable auto escaping? #49

Closed cesarvarela closed 6 years ago

cesarvarela commented 7 years ago

tried

  .pipe($.nunjucksRender({
      path: 'app',
      autoescape: false
  }))

but didn't work

dkngyn commented 7 years ago

I don't think this autoescape seems to work

.pipe(nunjucksRender({  
    path:'src/templates'
    envOptions: {autoescape: false},
}))

this is closer to readme instruction but still doesn't work.

or even in file template {{ message | safe}}

Hope there is a reply on this.

sebudde commented 7 years ago

envOptions: {autoescape: false} works for me. Thanks!

revelt commented 7 years ago

As @sebudde mentioned, the autoescape has to be set customising the environment options, not passing in the options object. This issue can be closed.