MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / escapeHTML

Function escapeHTML

packages/extension/utils/string.ts:30–32  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

28const ESCAPE_RE = /[&<>"]/g
29
30export function escapeHTML(str: string) {
31 return str.replace(ESCAPE_RE, (match) => ESCAPE_MAP[match])
32}
33
34export function looseEscapeHTML(str: string) {
35 return str.replaceAll('"', '&quot;')

Callers 5

stringifyBaseComponentFunction · 0.90
stringifyVueComponentFunction · 0.90
stringifyJSXComponentFunction · 0.90
mergeAttributesFunction · 0.90
string.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected