浏览代码

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

Fixed triple escaping for functions
Enrico Berti 11 年之前
父节点
当前提交
bcc1b7e
共有 1 个文件被更改,包括 2 次插入0 次删除
  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(/\{\{(.+?)\}\}/g, "{{{$1}}}");
+    _mustacheTmpl = _mustacheTmpl.replace(/\{\{\{\#hue_fn(.+?)\}\}\}/g, "{{#hue_fn$1}}")
+    _mustacheTmpl = _mustacheTmpl.replace(/\{\{\{\/hue_fn(.+?)\}\}\}/g, "{{/hue_fn$1}}")
   }
   }
   return _mustacheTmpl;
   return _mustacheTmpl;
 }
 }