MCPcopy
hub / github.com/koala73/worldmonitor / escapeHtml

Function escapeHtml

src/utils/sanitize.ts:9–12  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

7};
8
9export function escapeHtml(str: string): string {
10 if (!str) return '';
11 return String(str).replace(/[&<>"']/g, (char) => HTML_ESCAPE_MAP[char] || char);
12}
13
14export function sanitizeUrl(url: string): string {
15 if (!url) return '';

Callers 15

initSettingsWindowFunction · 0.90
initLiveChannelsWindowFunction · 0.90
renderSidebarFunction · 0.90
renderOverviewFunction · 0.90
renderFeatureSectionFunction · 0.90
renderSecretInputFunction · 0.90
refreshTrafficLogFunction · 0.90
highlightMatchFunction · 0.90
handleSearchFunction · 0.90
setHeroStoryMethod · 0.90
renderFeatureMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected