3 ms·
Instead of silly prefixes for "unsafe" strings, have a template language for generating HTML which has the safe interpolation built in. make_html("<p>Hello,
by kazinator 4y ago
Instead of silly prefixes for "unsafe" strings, have a template language for generating HTML which has the safe interpolation built in.
make_html("<p>Hello, %1</p>", userName)
The % interpolating notation can support an operator for the rarer situation when you want to opt out of HTML escaping.
This is still textual: get the string wrong and you get wrong HTML. You really want structural templating. It could use HTML syntax, but as a HTML quasiquote that is parsed.