variable output {{myVar}} should html encode per default
enthus1ast opened this issue · 3 comments
enthus1ast commented
variable output {{myVar}} should html encode per default
enthus1ast commented
not sure any more if Nimja should escape html, since other stuff then html could be templated.
Does anyone has an opinion on this?
enthus1ast commented
closed for now, if you think Nimja should, please reopen.
ajusa commented
Hm, I think it'd be nice to have Nimja escape HTML (but not by default). For anyone else who finds this issue, I think you can use https://nim-lang.org/docs/xmltree.html#escape%2Cstring then use Nimja's filter syntax to escape HTML, especially if it comes from an untrusted source.