* Escape HTML entities to prevent XSS
(text: string)
| 25 | * Escape HTML entities to prevent XSS |
| 26 | */ |
| 27 | private static escapeHtml (text: string): string { |
| 28 | const div = document.createElement('div'); |
| 29 | div.textContent = text; |
| 30 | return div.innerHTML; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Generate the modal HTML for an error |