From ef7d6d3af06b756d70aa052a82677e9a24b2ea9d Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Tue, 7 Apr 2020 22:40:37 -0400 Subject: [PATCH] add venv and URI encode video play links --- .gitignore | 1 + video_metadata/static/file_listing.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b589549..16fa90b 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ instance/* __pycache__/ tags *.swp +venv/ diff --git a/video_metadata/static/file_listing.js b/video_metadata/static/file_listing.js index e62ce09..4e0acc7 100644 --- a/video_metadata/static/file_listing.js +++ b/video_metadata/static/file_listing.js @@ -70,7 +70,7 @@ function openInfoCard(dataset, element) { // NOTE: add play link let a = document.createElement('a'); a.classList.add('play_link'); - a.href = VIDEO_PREFIX + dataset.rel_path; + a.href = encodeURI(VIDEO_PREFIX + dataset.rel_path); a.appendChild(document.createTextNode('play')); let div = blurb.querySelector('.search_result'); div.insertBefore(a, div.firstChild);