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