(embed) sandbox the iframe
This commit is contained in:
parent
054a103b28
commit
7754034641
|
@ -92,6 +92,7 @@ function buildVideoLink (time?: number) {
|
|||
|
||||
function buildVideoEmbed (embedUrl: string) {
|
||||
return '<iframe width="560" height="315" ' +
|
||||
'sandbox="allow-same-origin allow-scripts" ' +
|
||||
'src="' + embedUrl + '" ' +
|
||||
'frameborder="0" allowfullscreen>' +
|
||||
'</iframe>'
|
||||
|
|
|
@ -45,7 +45,7 @@ function generateOEmbed (req: express.Request, res: express.Response, next: expr
|
|||
thumbnailUrl = undefined
|
||||
}
|
||||
|
||||
const html = `<iframe width="${embedWidth}" height="${embedHeight}" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
|
||||
const html = `<iframe width="${embedWidth}" height="${embedHeight}" sandbox="allow-same-origin allow-scripts" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
|
||||
|
||||
const json: any = {
|
||||
type: 'video',
|
||||
|
|
Loading…
Reference in New Issue