1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

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
This commit is contained in:
Thavarasa Prasanth 2021-03-31 08:32:05 +02:00 committed by GitHub
parent 47099aba46
commit 4097c6d66c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 48 additions and 35 deletions

View file

@ -154,24 +154,6 @@ function root () {
return rootPath
}
// Thanks: https://stackoverflow.com/a/12034334
function escapeHTML (stringParam) {
if (!stringParam) return ''
const entityMap = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
'\'': '&#39;',
'/': '&#x2F;',
'`': '&#x60;',
'=': '&#x3D;'
}
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,