MCPcopy Create free account
hub / github.com/TruthHun/BookStack / utils_escape

Function utils_escape

static/katex/katex.js:314–318  ·  view source on GitHub ↗

* Escapes text to prevent scripting attacks.

(text)

Source from the content-addressed store, hash-verified

312 */
313
314function utils_escape(text) {
315 return String(text).replace(ESCAPE_REGEX, function (match) {
316 return ESCAPE_LOOKUP[match];
317 });
318}
319/**
320 * Sometimes we want to pull out the innermost element of a group. In most
321 * cases, this will just be the group itself, but when ordgroups and colors have

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected