Move helper function

This commit is contained in:
Alan Grainger
2026-02-09 11:30:56 +13:00
parent 2af6b4bbf0
commit ea4f16a436
2 changed files with 10 additions and 10 deletions
+9
View File
@@ -68,3 +68,12 @@ export function canDownload (share: SharedLink) {
return !!share.allowDownload
}
}
export function escapeHtml (str: string): string {
return str
.replace(/&/g, '&')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#039;')
}