Explorar o código

escape {} in tip

Mitsuhiro Tanda %!s(int64=10) %!d(string=hai) anos
pai
achega
7229c59b8e
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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));
         }
       };