* Escapes a string of HTML elements to HTML entities. * * @param {string} html HTML as string to escape. * @return {string}
(html)
| 17 | * @return {string} |
| 18 | */ |
| 19 | function escapeHtml(html) { |
| 20 | return html.replace(HTML_ESCAPE_REGEX, (c) => HTML_ESCAPE_CHARS[c]); |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Returns a Promise that resolves after the specified number of milliseconds. |
no test coverage detected