(s: string)
| 23 | } |
| 24 | |
| 25 | export const parseHtmlString = (s: string) => { |
| 26 | /* |
| 27 | |
| 28 | Note: when parsing a message such as "the <strong> tag is **great**!", |
| 29 | we don't want the first <strong> to be treated as an actual HTML tag, |
| 30 | so we escape it first here. |
| 31 | |
| 32 | */ |
| 33 | const escapedString = escapeAnglesOutsideBackticks(s) |
| 34 | return marked.parse(escapedString) |
| 35 | } |
| 36 | |
| 37 | export const sanitizeHtmlString = (s: string) => |
| 38 | sanitizeHtml(s, { |
no test coverage detected