Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2023-02-08 16:12:12


Dominique Devienne wrote:
> There are 4 use-cases IMHO, for a templating engine:
> 1) pure text-template. No escaping;
> 2) text-template to embed in some custom format, with its own escaping rules;
> 3) template generates HTML, and "some" characters of the placeholders need
> escaping;
> 4) template generates text, possibly HTML-like, meant to be embedded into
> HTML, thus "more" escaping is necessary.

I actually encountered (2) when writing the examples, because to generate
proper markdown, apostrophes must be escaped.

So there's definitely a practical need to supply a custom escaping function.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk