MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / escapeAttribute

Function escapeAttribute

src/pages/markdownPreview/renderer.js:31–37  ·  view source on GitHub ↗
(value = "")

Source from the content-addressed store, hash-verified

29}
30
31function escapeAttribute(value = "") {
32 return String(value)
33 .replace(/&/g, "&")
34 .replace(/"/g, """)
35 .replace(/</g, "&lt;")
36 .replace(/>/g, "&gt;");
37}
38
39function splitLinkTarget(target = "") {
40 const hashIndex = target.indexOf("#");

Callers 1

createMarkdownItFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected