From 1a9057a175bbf02c6e8c562693f0b12d656923f2 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 24 Jan 2019 00:01:56 -0600 Subject: [PATCH] Add fix to download widget for titles with unescaped characters --- assets/js/watch.js | 3 ++- src/invidious/views/watch.ecr | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/watch.js b/assets/js/watch.js index 3988234aa..81fa62887 100644 --- a/assets/js/watch.js +++ b/assets/js/watch.js @@ -51,7 +51,8 @@ function hide_youtube_replies(target) { target.setAttribute("onclick", "show_youtube_replies(this)"); } -function download_video(title) { +function download_video(target) { + var title = target.getAttribute("data-title"); var children = document.getElementById("download_widget").children; var progress = document.getElementById("download-progress"); var url = ""; diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 3f1ff3bcd..d5ab54116 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -75,7 +75,7 @@ -