MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / escapeForAttr

Function escapeForAttr

packages/app-core/src/components/Sidebar.tsx:123–127  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

121const ACTIVE_TAG_PARSE_LARGE_BODY_DELAY_MS = 900;
122
123function escapeForAttr(value: string): string {
124 if (typeof CSS !== "undefined" && typeof CSS.escape === "function")
125 return CSS.escape(value);
126 return value.replace(/["\\]/g, "\\$&");
127}
128
129function sidebarAnchorSelectorForElement(el: HTMLElement): string | null {
130 const type = el.dataset.sidebarType;

Callers 3

revealFunction · 0.70
findTargetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected