Also add "allow-forms" to oembed
This commit is contained in:
parent
78e4cc30c5
commit
da63a030f3
2 changed files with 4 additions and 4 deletions
|
@ -74,7 +74,7 @@ describe('Test services', function () {
|
||||||
const oembedUrl = server.url + basePath + video.uuid + suffix.input
|
const oembedUrl = server.url + basePath + video.uuid + suffix.input
|
||||||
|
|
||||||
const res = await server.services.getOEmbed({ oembedUrl })
|
const res = await server.services.getOEmbed({ oembedUrl })
|
||||||
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" ' +
|
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||||
`title="${video.name}" src="http://${server.host}/videos/embed/${video.uuid}${suffix.output}" ` +
|
`title="${video.name}" src="http://${server.host}/videos/embed/${video.uuid}${suffix.output}" ` +
|
||||||
'frameborder="0" allowfullscreen></iframe>'
|
'frameborder="0" allowfullscreen></iframe>'
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ describe('Test services', function () {
|
||||||
const oembedUrl = server.url + basePath + playlistUUID + suffix.input
|
const oembedUrl = server.url + basePath + playlistUUID + suffix.input
|
||||||
|
|
||||||
const res = await server.services.getOEmbed({ oembedUrl })
|
const res = await server.services.getOEmbed({ oembedUrl })
|
||||||
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups" ' +
|
const expectedHtml = '<iframe width="560" height="315" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||||
`title="${playlistDisplayName}" src="http://${server.host}/video-playlists/embed/${playlistUUID}${suffix.output}" ` +
|
`title="${playlistDisplayName}" src="http://${server.host}/video-playlists/embed/${playlistUUID}${suffix.output}" ` +
|
||||||
'frameborder="0" allowfullscreen></iframe>'
|
'frameborder="0" allowfullscreen></iframe>'
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ describe('Test services', function () {
|
||||||
const maxWidth = 50
|
const maxWidth = 50
|
||||||
|
|
||||||
const res = await server.services.getOEmbed({ oembedUrl, format, maxHeight, maxWidth })
|
const res = await server.services.getOEmbed({ oembedUrl, format, maxHeight, maxWidth })
|
||||||
const expectedHtml = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts allow-popups" ' +
|
const expectedHtml = '<iframe width="50" height="50" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ' +
|
||||||
`title="${video.name}" src="http://${server.host}/videos/embed/${video.uuid}" ` +
|
`title="${video.name}" src="http://${server.host}/videos/embed/${video.uuid}" ` +
|
||||||
'frameborder="0" allowfullscreen></iframe>'
|
'frameborder="0" allowfullscreen></iframe>'
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ function buildOEmbed (options: {
|
||||||
thumbnailUrl = undefined
|
thumbnailUrl = undefined
|
||||||
}
|
}
|
||||||
|
|
||||||
const html = `<iframe width="${embedWidth}" height="${embedHeight}" sandbox="allow-same-origin allow-scripts allow-popups" ` +
|
const html = `<iframe width="${embedWidth}" height="${embedHeight}" sandbox="allow-same-origin allow-scripts allow-popups allow-forms" ` +
|
||||||
`title="${embedTitle}" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
|
`title="${embedTitle}" src="${embedUrl}" frameborder="0" allowfullscreen></iframe>`
|
||||||
|
|
||||||
const json: any = {
|
const json: any = {
|
||||||
|
|
Loading…
Reference in a new issue