(content = "")
| 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, "<").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" } |