MCPcopy Create free account
hub / github.com/breck7/scroll / escapeScrollAndHtml

Method escapeScrollAndHtml

external/.scrollLibs.js:14030–14032  ·  view source on GitHub ↗
(content = "")

Source from the content-addressed store, hash-verified

14028 }
14029 // Only allow text content and inline styling. Don't allow HTML tags or any nested scroll tags or escape characters.
14030 static escapeScrollAndHtml(content = "") {
14031 return content.replace(/</g, "&lt;").replace(/\n/g, "").replace(/\r/g, "").replace(/\\/g, "")
14032 }
14033 static colorize(message, colorNameOrString = "red") {
14034 // ANSI: https://en.wikipedia.org/wiki/ANSI_escape_code
14035 const colors = { red: "\x1b[31m", green: "\x1b[32m", yellow: "\x1b[33m" }

Callers

nothing calls this directly

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected