The OpenD Programming Language

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. You can suppress with by setting encodeNonAscii = false

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()
,
bool encodeNonAscii = true
)

See Also

Meta