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

Function escapeAttribute

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

Source from the content-addressed store, hash-verified

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

Callers 1

inlineMarkdownToHtmlFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected