I'm setting up a website which would allow users to use certain select latex commands to build a document. They would then be able to preview the document, which means I would:
- parse the text file to make sure only the allowed commands are there
- use PHP to send the user's text to the
pdflatex
command - display the outputted pdf to the user
How secure is this? Is there a better way of doing this?