MCPcopy Index your code
hub / github.com/simstudioai/sim / escapeHtml

Function escapeHtml

apps/sim/tools/gmail/utils.ts:324–331  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

322 * Escape HTML special characters so user-supplied text renders safely inside an HTML body.
323 */
324export function escapeHtml(value: string): string {
325 return value
326 .replace(/&/g, '&')
327 .replace(/</g, '&lt;')
328 .replace(/>/g, '&gt;')
329 .replace(/"/g, '&quot;')
330 .replace(/'/g, '&#39;')
331}
332
333/**
334 * Convert a plain-text body to an HTML body that flows naturally in Gmail.

Callers 2

utils.test.tsFile · 0.90
plainTextToHtmlFunction · 0.70

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected