Jelajahi Sumber

HUE-8660 [assist] Fix file preview in left assist for files with # in the name

Johan Ahlen 7 tahun lalu
induk
melakukan
cf89af8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      desktop/core/src/desktop/static/desktop/js/apiHelper.js

+ 1 - 1
desktop/core/src/desktop/static/desktop/js/apiHelper.js

@@ -543,7 +543,7 @@ var ApiHelper = (function () {
     if (clonedPath.length && clonedPath[0] === '/') {
       clonedPath.shift();
     }
-    url += clonedPath.join('/') + '?compression=none&mode=text';
+    url += clonedPath.join('/').replace(/#/, '%23') + '?compression=none&mode=text';
     url += '&offset=' + (options.offset || 0);
     url += '&length=' + (options.length || 118784);