From a434c465455d63a3961e778abca82150186cf171 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 28 Nov 2017 17:11:07 +0100 Subject: Change tab when changing follow url --- server/controllers/client.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'server') diff --git a/server/controllers/client.ts b/server/controllers/client.ts index 045a50ef0..64e5829ca 100644 --- a/server/controllers/client.ts +++ b/server/controllers/client.ts @@ -51,16 +51,16 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoInstance const previewUrl = CONFIG.WEBSERVER.URL + STATIC_PATHS.PREVIEWS + video.getPreviewName() const videoUrl = CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid - const videoName = escapeHTML(video.name) - const videoDescription = escapeHTML(video.description) + const videoNameEscaped = escapeHTML(video.name) + const videoDescriptionEscaped = escapeHTML(video.description) const embedUrl = CONFIG.WEBSERVER.URL + video.getEmbedPath() const openGraphMetaTags = { 'og:type': 'video', - 'og:title': videoName, + 'og:title': videoNameEscaped, 'og:image': previewUrl, 'og:url': videoUrl, - 'og:description': videoDescription, + 'og:description': videoDescriptionEscaped, 'og:video:url': embedUrl, 'og:video:secure_url': embedUrl, @@ -68,14 +68,14 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoInstance 'og:video:width': EMBED_SIZE.width, 'og:video:height': EMBED_SIZE.height, - 'name': videoName, - 'description': videoDescription, + 'name': videoNameEscaped, + 'description': videoDescriptionEscaped, 'image': previewUrl, 'twitter:card': 'summary_large_image', 'twitter:site': '@Chocobozzz', - 'twitter:title': videoName, - 'twitter:description': videoDescription, + 'twitter:title': videoNameEscaped, + 'twitter:description': videoDescriptionEscaped, 'twitter:image': previewUrl, 'twitter:player': embedUrl, 'twitter:player:width': EMBED_SIZE.width, @@ -86,7 +86,7 @@ function addOpenGraphAndOEmbedTags (htmlStringPage: string, video: VideoInstance { type: 'application/json+oembed', href: CONFIG.WEBSERVER.URL + '/services/oembed?url=' + encodeURIComponent(videoUrl), - title: videoName + title: videoNameEscaped } ] -- cgit v1.2.3