diff options
author | Thavarasa Prasanth <45243326+pthavarasa@users.noreply.github.com> | 2021-03-31 08:32:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-31 08:32:05 +0200 |
commit | 4097c6d66cb2919c28b5bce44b259e630923fbe0 (patch) | |
tree | d57897b0b8762202a0be90388e9a79153690b9d9 /server/helpers | |
parent | 47099aba46be7757d833422f1706b99a3c0e28ea (diff) | |
download | PeerTube-4097c6d66cb2919c28b5bce44b259e630923fbe0.tar.gz PeerTube-4097c6d66cb2919c28b5bce44b259e630923fbe0.tar.zst PeerTube-4097c6d66cb2919c28b5bce44b259e630923fbe0.zip |
fix missing title attribute on <iframe> tag suggested for embedding (#3901)
* title attribute is missing on <iframe> tag suggested for embedding #3861
* fix #3901
* fix: escapeHTML #3901
* fix: playlist title instead of video title #3901
* fix #3901
* assign title directly #3901
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, |