String.htmlEncode

HTML encodes an HTML string ensuring that HTML is displayed as text.

Creates a div element assigns the text and then reads back the encoded HTML text.

o.String.htmlEncode()

See also

Class String