mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
escape {} in tip
This commit is contained in:
@@ -13,6 +13,7 @@ function (angular, kbn) {
|
|||||||
link: function(scope, elem, attrs) {
|
link: function(scope, elem, attrs) {
|
||||||
var _t = '<i class="grafana-tip fa fa-'+(attrs.icon||'question-circle')+'" bs-tooltip="\''+
|
var _t = '<i class="grafana-tip fa fa-'+(attrs.icon||'question-circle')+'" bs-tooltip="\''+
|
||||||
kbn.addslashes(elem.text())+'\'"></i>';
|
kbn.addslashes(elem.text())+'\'"></i>';
|
||||||
|
_t = _t.replace(/{/g, '\\{').replace(/}/g, '\\}');
|
||||||
elem.replaceWith($compile(angular.element(_t))(scope));
|
elem.replaceWith($compile(angular.element(_t))(scope));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user