3 ms·
Who said it's about trusting you? It's very common for templates to be written by people who are not full developers. The HTML might be written by a designer,
by tirpen 5y ago
Who said it's about trusting you?
It's very common for templates to be written by people who are not full developers.
The HTML might be written by a designer, email-templates may be written by marketing etc.
By limiting the power of the template language to only data display and simple conditionals and loops, you can those people to write templates far easier and you can let them upload new versions whenever they want with much less worries and you don't have to go through your full code review process just to update an email template.
- WalterGR 5y agoWell, you can’t trust anyone! :) Template languages are still languages, and it’s easy for even seasoned developers to make errors that have to be corrected between ‘upload’ and whatever deployment looks like in this scenario. Forget to double-up the closing curly-brackets? Blammo. I wonder how common it is in practice. Are there existing frameworks or (non-no/low code) CMSes that support that workflow? I.e. letting non-admins modify templates, ‘compiling’ them if necessary, running them over some sample input, and allowing iteration - before potentially breaking things in production? Limiting the language to avoid having to do a full security audit - that’s a good point.