I want to build a report builder in my web application. The user collects data through other parts of the site, and then should be able to generate "reports" in which he can use the specified data in the style of the document. I want the user to be able to use basic math functions, get / set their own variables, etc. I guess why reinvent the wheel? If I let the user write a report with something like the Twig Template Engine and include only certain extensions for them to use, does that make it reasonably safe? Twig templates already remove any php found in the markup, and there are not many powerful features that you can use other than basic line changes, etc. Let me know your thoughts.
source share