twigjs / twig.js

JS implementation of the Twig Templating Language
BSD 2-Clause "Simplified" License
1.88k stars 275 forks source link

Any plans to implement sandbox functionality from Twig? #204

Open thardy opened 9 years ago

thardy commented 9 years ago

I'm writing a static-site CMS in NodeJs and need a templating engine that can safely render user-generated templates. I want to restrict the functionality to a very limited subset of developer-chosen features. The sandbox feature of Twig would satisfy this.

Are there plans to implement sandbox in twig.js?

evgenius commented 9 years ago

Hi @thardy ,

Currently Twig.js is growing due to the help of the contributors. We're at FoxyCart are trying to support this process but unfortunately we don't have a timeframe for the sandbox tag.

Do you think you could implement this feature yourself?

thardy commented 9 years ago

I'm currently looking into getting Swig.js to work in a protected mode. I think I'm close to getting it to work, but if I can't, I'll certainly look into doing this with Twig.js.

evgenius commented 9 years ago

@thardy Interesting. Is Swig compatible with Twig templates?

brunowego commented 9 years ago

+1