Explorar o código

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

Fixed triple escaping for functions
Enrico Berti %!s(int64=11) %!d(string=hai) anos
pai
achega
bcc1b7e
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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;
 }