Invidious is an alternative front-end to YouTube
Add fix to download widget for titles with unescaped characters
Omar Roth1a9057a175bb
diff --git a/assets/js/watch.js b/assets/js/watch.jsindex 3988234a..81fa6288 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.ecrindex 3f1ff3bc..d5ab5411 100644--- a/src/invidious/views/watch.ecr+++ b/src/invidious/views/watch.ecr@@ -75,7 +75,7 @@</div></div>- <button type="button" onclick='download_video("<%= video.title.dump_unquoted %>-<%= video.id %>.mp4")'+ <button type="button" data-title="<%= video.title.dump_unquoted %>-<%= video.id %>.mp4" onclick="download_video(this)"class="pure-button pure-button-primary"><%= translate(locale, "Download") %></button>