//#region src/api/escape.ts
/** HTML-escape a string to prevent XSS when interpolated into HTML/JS */
function escapeHtml(str) {
	return str.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;").replaceAll("'", "&#x27;");
}

//#endregion
export { escapeHtml as t };
//# sourceMappingURL=escape-DqD0aCKu.mjs.map