diff options
Diffstat (limited to 'server/helpers')
-rw-r--r-- | server/helpers/core-utils.ts | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index 0bd84ffaa..b93868c12 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -154,24 +154,6 @@ function root () { | |||
154 | return rootPath | 154 | return rootPath |
155 | } | 155 | } |
156 | 156 | ||
157 | // Thanks: https://stackoverflow.com/a/12034334 | ||
158 | function escapeHTML (stringParam) { | ||
159 | if (!stringParam) return '' | ||
160 | |||
161 | const entityMap = { | ||
162 | '&': '&', | ||
163 | '<': '<', | ||
164 | '>': '>', | ||
165 | '"': '"', | ||
166 | '\'': ''', | ||
167 | '/': '/', | ||
168 | '`': '`', | ||
169 | '=': '=' | ||
170 | } | ||
171 | |||
172 | return String(stringParam).replace(/[&<>"'`=/]/g, s => entityMap[s]) | ||
173 | } | ||
174 | |||
175 | function pageToStartAndCount (page: number, itemsPerPage: number) { | 157 | function pageToStartAndCount (page: number, itemsPerPage: number) { |
176 | const start = (page - 1) * itemsPerPage | 158 | const start = (page - 1) * itemsPerPage |
177 | 159 | ||
@@ -278,7 +260,6 @@ export { | |||
278 | 260 | ||
279 | objectConverter, | 261 | objectConverter, |
280 | root, | 262 | root, |
281 | escapeHTML, | ||
282 | pageToStartAndCount, | 263 | pageToStartAndCount, |
283 | sanitizeUrl, | 264 | sanitizeUrl, |
284 | sanitizeHost, | 265 | sanitizeHost, |