htmlEntitiesEncode

Given text, encode all html entities on it - &, <, >, and ". This function also encodes all 8 bit characters as entities, thus ensuring the resultant text will work even if your charset isn't set right.

The output parameter can be given to append to an existing buffer. You don't have to pass one; regardless, the return value will be usable for you, with just the data encoded.

string
htmlEntitiesEncode
(
string data
,
Appender!string output = appender!string()
)

Meta