MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / htmlEncode

Function htmlEncode

framework/utils/lib/utils.ts:260–267  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

258}
259
260export const htmlEncode = (str: string) => str.replace(/[&<>'"]/g,
261 (tag: string) => ({
262 '&': '&amp;',
263 '<': '&lt;',
264 '>': '&gt;',
265 "'": '&#39;',
266 '"': '&quot;',
267 }[tag]));
268
269export function Counter<T extends (string | number) = string>() {
270 return new Proxy({}, {

Callers 2

getProblemMethod · 0.85
getProblemMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected