Move helper function
This commit is contained in:
@@ -68,3 +68,12 @@ export function canDownload (share: SharedLink) {
|
||||
return !!share.allowDownload
|
||||
}
|
||||
}
|
||||
|
||||
export function escapeHtml (str: string): string {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user