Browse Source

add encodeURIComponent when sending rel_path from javascript

master
cinnaboot 6 years ago
parent
commit
3045ea5391
  1. 2
      video_metadata/static/file_listing.js
  2. 1
      video_metadata/views/tmdb.py

2
video_metadata/static/file_listing.js

@ -56,7 +56,7 @@ function addContents(node, json) {
// NOTE: display an 'info card' for a path that has already been stored
function openInfoCard(dataset, element) {
query_str = PATH_PATH + '?rel_path=' + dataset.rel_path;
query_str = PATH_PATH + '?rel_path=' + encodeURIComponent(dataset.rel_path);
fetchJSON(query_str, function(json) {
if (json.errors) {
for (let e of json.errors)

1
video_metadata/views/tmdb.py

@ -234,6 +234,7 @@ def query_path_json():
cur.execute(q, (path, ))
row = cur.fetchone()
current_app.logger.debug(f'path: {path}, row: {row}')
if errors:
for e in errors:

Loading…
Cancel
Save