mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2026-09-03 20:53:09 -05:00
Safer iframe creation
This commit is contained in:
@@ -53,7 +53,7 @@ function decorateVideoLink (options: {
|
||||
}) {
|
||||
const { url } = options
|
||||
|
||||
const params = generateParams(window.location.search)
|
||||
const params = new URLSearchParams()
|
||||
|
||||
if (options.startTime !== undefined && options.startTime !== null) {
|
||||
const startTimeInt = Math.floor(options.startTime)
|
||||
@@ -85,7 +85,7 @@ function decoratePlaylistLink (options: {
|
||||
}) {
|
||||
const { url } = options
|
||||
|
||||
const params = generateParams(window.location.search)
|
||||
const params = new URLSearchParams()
|
||||
|
||||
if (options.playlistPosition) params.set('playlistPosition', '' + options.playlistPosition)
|
||||
|
||||
@@ -119,12 +119,3 @@ function buildUrl (url: string, params: URLSearchParams) {
|
||||
|
||||
return url
|
||||
}
|
||||
|
||||
function generateParams (url: string) {
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
// Unused parameters in embed
|
||||
params.delete('videoId')
|
||||
params.delete('resume')
|
||||
|
||||
return params
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user