frontend: Add xml escaping to collection creation forms

This commit is contained in:
Lennart
2025-07-07 21:18:16 +02:00
parent 0e68f1bdce
commit 105718a4ca
6 changed files with 41 additions and 28 deletions

View File

@@ -0,0 +1,7 @@
export function escapeXml(unsafe: string): string {
return unsafe.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&apos;')
}