Boost logo

Boost :

Subject: Re: [boost] htmlspecialchars and urlencode?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2015-02-18 07:44:54


On 18/02/2015 12:57, Olaf van der Spek wrote:
> Hi,
>
> Does Boost have functions like htmlspecialchars and urlencode (from PHP)?
> If not, I think they'd make a nice addition to the string algorithm lib.
>

htmlspecialchars is just replacing < with &lt;, > with &gt; and & with
&amp; (optionally " with &quot; and ' with &#039; as well).

It's a trivial application of the replace algorithm to the world of HTML
and XML. I'm not sure the string algorithm lib is the right place for
it, maybe an XML lib would be better.


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