(html: string)
| 272 | } |
| 273 | |
| 274 | function stripUnsafeUrls(html: string): string { |
| 275 | return html.replace(/href\s*=\s*(['"])(?:javascript|vbscript|data):.*?\1/gi, 'href="#"') |
| 276 | } |
| 277 | |
| 278 | async function renderEmailHtml(markdown: string, chatUrl: string): Promise<string> { |
| 279 | const safeMarkdown = preserveSoftBreaks(stripRawHtml(markdown)) |
no test coverage detected