MCPcopy Create free account
hub / github.com/dailydotdev/apps / escapeAttribute

Function escapeAttribute

packages/shared/src/lib/markdownConversion.ts:6–7  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

4 value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
5
6const escapeAttribute = (value: string): string =>
7 value.replace(/"/g, '&quot;');
8
9const normalizeText = (value: string): string => value.replace(/\u00a0/g, ' ');
10

Callers 1

inlineMarkdownToHtmlFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected