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:
parent
47099aba46
commit
4097c6d66c
13 changed files with 48 additions and 35 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue