Secure php template template

I find that the php template engine allows only a user-defined function or only permits whitelist functions. My problem is that I will allow the user to edit their templates. Therefore, I need a secure template engine.

+3
source share
3 answers

The twig project ( http://www.twig-project.org/ ) has a sandbox mode.

+5
source

Rain implements a blacklisted sandbox if you ask them to add a whitelist http://www.raintpl.com/

+1
source

(if), () , , Text-Template : https://github.com/dermatthes/text-template

eval() 'd. . 50 < 3.

+1
source

Source: https://habr.com/ru/post/1762084/


All Articles