MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / escapeHtml

Function escapeHtml

public/ts/utils/misc.ts:46–49  ·  view source on GitHub ↗
(unsafe: string)

Source from the content-addressed store, hash-verified

44}
45
46export function escapeHtml(unsafe: string) {
47 return unsafe.replaceAll('&', '&amp;').replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll('"', '&quot;')
48 .replaceAll("'", '&#039;');
49}
50
51export function escapeXml(unsafe: string) {
52 return escapeHtml(unsafe).replaceAll('\r', '&#13;');

Callers 14

SettingsFunction · 0.90
formatNewsFeedsToOpmlFunction · 0.90
generateInputHtmlFunction · 0.90
misc_test.tsFile · 0.90
SettingsFunction · 0.90
formatNewsFeedsToOpmlFunction · 0.90
defaultHtmlContentFunction · 0.90
defaultHtmlContentFunction · 0.90
defaultHtmlContentFunction · 0.90
basicLayoutFunction · 0.90
getHtmlBodyMethod · 0.90
sendVerificationEmailMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected