Move helper function
This commit is contained in:
+1
-10
@@ -1,20 +1,11 @@
|
||||
import immich from './immich'
|
||||
import { Response } from 'express-serve-static-core'
|
||||
import { Asset, AssetType, ImageSize, IncomingShareRequest, SharedLink } from './types'
|
||||
import { canDownload, getConfigOption } from './functions'
|
||||
import { canDownload, escapeHtml, getConfigOption } from './functions'
|
||||
import archiver from 'archiver'
|
||||
import { respondToInvalidRequest } from './invalidRequestHandler'
|
||||
import { sanitize } from './includes/sanitize'
|
||||
|
||||
function escapeHtml (str: string): string {
|
||||
return str
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/"/g, '"')
|
||||
.replace(/'/g, ''')
|
||||
}
|
||||
|
||||
class Render {
|
||||
lgConfig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user