airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From machris...@apache.org
Subject [airavata-php-gateway] branch master updated: AIRAVATA-2798 encode special characters in filenames
Date Fri, 01 Jun 2018 20:35:41 GMT
This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-php-gateway.git


The following commit(s) were added to refs/heads/master by this push:
     new 0054c6b  AIRAVATA-2798 encode special characters in filenames
0054c6b is described below

commit 0054c6b911b8a4d84e528dd1aa118127454b5790
Author: Marcus Christie <machrist@iu.edu>
AuthorDate: Fri Jun 1 16:34:33 2018 -0400

    AIRAVATA-2798 encode special characters in filenames
---
 public/js/filemanager.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/public/js/filemanager.js b/public/js/filemanager.js
index 7f241dc..f6f675a 100644
--- a/public/js/filemanager.js
+++ b/public/js/filemanager.js
@@ -94,10 +94,10 @@ function show_table(files){
         var icon_class, name_link;
         if (f.folder) {
             icon_class = 'glyphicon glyphicon-folder-open';
-            name_link = '<a href="#" onclick=dir_click("' + f.link + '")>&nbsp;'
+ f.name + "</a>";
+            name_link = '<a href="#" onclick=dir_click(' + JSON.stringify(f.link) + ')>&nbsp;'
+ f.name + "</a>";
         } else {
             icon_class = 'glyphicon glyphicon-save-file';
-            name_link = '<a href="../download?path=' + f.link + '">&nbsp;' + f.name
+ '</a>';
+            name_link = '<a href="../download?path=' + encodeURIComponent(f.link) + '">&nbsp;'
+ f.name + '</a>';
         }
 
         html += '<tr>'

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.

Mime
View raw message