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

Any plans to implement sandbox functionality from Twig?

Open thardy opened this issue 10 years ago • 4 comments

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?

thardy avatar Jan 14 '15 16:01 thardy

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?

evgenius avatar Jan 18 '15 09:01 evgenius

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.

thardy avatar Jan 20 '15 02:01 thardy

@thardy Interesting. Is Swig compatible with Twig templates?

evgenius avatar Jan 21 '15 14:01 evgenius

+1

brunowego avatar Mar 19 '15 18:03 brunowego