X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fhelpers%2Fcore-utils.ts;h=b93868c1235913078bf2bd139153306e57bcebcd;hb=2539932e16129992a2c0889b4ff527c265a8e2c7;hp=0bd84ffaa88f2f6c59578210e7b654186673a673;hpb=32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf;p=github%2FChocobozzz%2FPeerTube.git 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 () { return rootPath } -// Thanks: https://stackoverflow.com/a/12034334 -function escapeHTML (stringParam) { - if (!stringParam) return '' - - const entityMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', - '/': '/', - '`': '`', - '=': '=' - } - - return String(stringParam).replace(/[&<>"'`=/]/g, s => entityMap[s]) -} - function pageToStartAndCount (page: number, itemsPerPage: number) { const start = (page - 1) * itemsPerPage @@ -278,7 +260,6 @@ export { objectConverter, root, - escapeHTML, pageToStartAndCount, sanitizeUrl, sanitizeHost,