Html escaping for security: howto in D?
Adam D. Ruppe
destructionator at gmail.com
Wed Jul 8 02:18:45 UTC 2020
On Wednesday, 8 July 2020 at 02:17:31 UTC, Adam D. Ruppe wrote:
> On Tuesday, 7 July 2020 at 23:19:46 UTC, aberba wrote:
>>>I believe Adam (arsd) has some function in his
>>> library for doing html entities of tags.
>>
>> See
>> https://dpldocs.info/experimental-docs/arsd.dom.htmlEntitiesEncode.html
oh another note: that specific function does not encode ' either.
So if you using it in an attribute make sure you double quote it
correctly.
If you build a tree using dom.d's Element class, it will do that
consistently for you.
More information about the Digitalmars-d
mailing list