MCPcopy Create free account
hub / github.com/Epic0522/Codex-Remote-Contact / htmlDecode

Function htmlDecode

src/server.js:2404–2413  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

2402}
2403
2404function htmlDecode(value) {
2405 return String(value || "")
2406 .replace(/&/g, "&")
2407 .replace(/&lt;/g, "<")
2408 .replace(/&gt;/g, ">")
2409 .replace(/&quot;/g, "\"")
2410 .replace(/&#39;/g, "'")
2411 .replace(/&#x([0-9a-f]+);/gi, (_, hex) => String.fromCodePoint(parseInt(hex, 16)))
2412 .replace(/&#(\d+);/g, (_, num) => String.fromCodePoint(Number(num)));
2413}
2414
2415function normalizeDuckDuckGoUrl(url) {
2416 try {

Callers 2

parseDuckDuckGoResultsFunction · 0.85
cleanHtmlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected