escape {} in tip

This commit is contained in:
Mitsuhiro Tanda 2015-08-30 15:06:35 +09:00
parent 7c6e49ec65
commit 7229c59b8e

View File

@ -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));
}
};