Browse Source

HUE-2190 [search] Truncate function doesn't work anymore

Fixed triple escaping for functions
Enrico Berti 11 năm trước cách đây
mục cha
commit
bcc1b7e
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      apps/search/static/js/search.utils.js

+ 2 - 0
apps/search/static/js/search.utils.js

@@ -157,6 +157,8 @@ function fixTemplateDotsAndFunctionNames(template) {
       }
     });
     _mustacheTmpl = _mustacheTmpl.replace(/\{\{(.+?)\}\}/g, "{{{$1}}}");
+    _mustacheTmpl = _mustacheTmpl.replace(/\{\{\{\#hue_fn(.+?)\}\}\}/g, "{{#hue_fn$1}}")
+    _mustacheTmpl = _mustacheTmpl.replace(/\{\{\{\/hue_fn(.+?)\}\}\}/g, "{{/hue_fn$1}}")
   }
   return _mustacheTmpl;
 }