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

Function escapeHtml

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

Source from the content-addressed store, hash-verified

1import { getVideoMimeType, isVideoUrl } from './video';
2
3const escapeHtml = (value: string): string =>
4 value.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
5
6const escapeAttribute = (value: string): string =>
7 value.replace(/"/g, '&quot;');

Callers 2

inlineMarkdownToHtmlFunction · 0.70
markdownToHtmlBasicFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected