MCPcopy Create free account
hub / github.com/btd/rollup-plugin-visualizer / htmlEscape

Function htmlEscape

plugin/render-template/html.ts:7–13  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

5import { RenderTemplateOptions } from "./types.js";
6
7const htmlEscape = (str: string) =>
8 str
9 .replace(/&/g, "&")
10 .replace(/"/g, """)
11 .replace(/'/g, "'")
12 .replace(/</g, "&lt;")
13 .replace(/>/g, "&gt;");
14
15const buildHtmlTemplate = (title: string, script: string, nodesData: string, style: string) =>
16 `

Callers 1

buildHtmlTemplateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected