encode oembed full url

This commit is contained in:
Thomas Zarebczan 2022-01-29 15:04:19 -05:00
parent b3d9fe5473
commit 185c2d8496
No known key found for this signature in database
GPG key ID: D505010BDB4364BC

View file

@ -54,7 +54,7 @@ function generateOEmbedData(claim, referrerQuery) {
const authorUrl = authorClaim ? `${URL}/${authorUrlPath}` : null; const authorUrl = authorClaim ? `${URL}/${authorUrlPath}` : null;
const thumbnailUrl = value && value.thumbnail && value.thumbnail.url && getThumbnailCdnUrl(value.thumbnail.url); const thumbnailUrl = value && value.thumbnail && value.thumbnail.url && getThumbnailCdnUrl(value.thumbnail.url);
const videoUrl = const videoUrl =
generateEmbedUrl(claim.name, claim.claim_id) + encodeURIComponent(generateEmbedUrl(claim.name, claim.claim_id)) +
(referrerQuery ? `r=${encodeURIComponent(escapeHtmlProperty(referrerQuery))}` : ''); (referrerQuery ? `r=${encodeURIComponent(escapeHtmlProperty(referrerQuery))}` : '');
const { html, width, height } = generateEmbedIframeData(videoUrl); const { html, width, height } = generateEmbedIframeData(videoUrl);