ConstEscape ampersands, angle brackets, quotes, and forward slashes as HTML entities.
This performs character escaping only. It does not sanitize arbitrary HTML, validate URLs, or make every HTML, JavaScript, or CSS context safe.
Usage:
import { escapeHTML } from "mazey";
const ret = escapeHTML("<div>hello world</div>");
console.log(ret);
Output:
<div>hello world</div>
The string to escape.
The escaped string.
Deprecated alias of escapeHTML.