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 import _
_ from 'radashi'
import _
_.function escapeHTML(input: string): string
Escape HTML characters in a string.
escapeHTML('<div>Hello, world!</div>')// => '<div>Hello, world!</div>'