瀏覽代碼

escape {} in tip

Mitsuhiro Tanda 10 年之前
父節點
當前提交
7229c59b8e
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      public/app/directives/misc.js

+ 1 - 0
public/app/directives/misc.js

@@ -13,6 +13,7 @@ function (angular, kbn) {
         link: function(scope, elem, attrs) {
           var _t = '<i class="grafana-tip fa fa-'+(attrs.icon||'question-circle')+'" bs-tooltip="\''+
             kbn.addslashes(elem.text())+'\'"></i>';
+          _t = _t.replace(/{/g, '\\{').replace(/}/g, '\\}');
           elem.replaceWith($compile(angular.element(_t))(scope));
         }
       };