escapeHTML
Escape HTML characters in a string
147 bytes
since v12.6.0
Usage
Replaces all occurrences of the following characters with their corresponding HTML entities:
&
with&
<
with<
>
with>
"
with"
'
with'
import * as _ from 'radashi'
_.escapeHTML('<div>Hello, world!</div>')// => '<div>Hello, world!</div>'