diff --git a/physionet-django/project/templates/project/edit_files_panel.html b/physionet-django/project/templates/project/edit_files_panel.html index 53e1bd8197..724eee3cfd 100644 --- a/physionet-django/project/templates/project/edit_files_panel.html +++ b/physionet-django/project/templates/project/edit_files_panel.html @@ -26,7 +26,7 @@ {{ breadcrumb.name }} {% else %} {{ breadcrumb.name }} / {% endif %} @@ -64,7 +64,7 @@ {% if subdir %} - Parent Directory + Parent Directory @@ -72,7 +72,7 @@ {% endif %} {% for dir in display_dirs %} - {{ dir.name }} + {{ dir.name }} {% if files_editable %}{% endif %} @@ -117,7 +117,7 @@ }; }, accept: (file, done) => { - const payload = {size: file.size, filename: `{{ subdir }}/${file.upload.filename}`, csrfmiddlewaretoken: "{{ csrf_token }}"}; + const payload = {size: file.size, filename: "{{ subdir|escapejs }}/" + file.upload.filename, csrfmiddlewaretoken: "{{ csrf_token }}"}; $.post("{% url 'generate_signed_url' project_slug=project.slug %}", payload, "json") .done(data => {