()
| 213 | } |
| 214 | } |
| 215 | |
| 216 | // ==================== Utilities ==================== |
| 217 | class Utils { |
| 218 | static escape(text: string): string { |
| 219 | return text.replace( |
| 220 | /[&<>"']/g, |
| 221 | (m) => |
| 222 | ({ |
| 223 | "&": "&", |
| 224 | "<": "<", |
| 225 | ">": ">", |
| 226 | '"': """, |
| 227 | "'": "'", |