mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
commit
06468d6f43
@ -35,7 +35,7 @@ function (angular, _) {
|
||||
};
|
||||
|
||||
function regexEscape(value) {
|
||||
return value.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
return value.replace(/[\\^$*+?.()|[\]{}\/]/g, '\\$&');
|
||||
}
|
||||
|
||||
function luceneEscape(value) {
|
||||
|
@ -135,6 +135,11 @@ define([
|
||||
expect(result).to.be('test|test2');
|
||||
});
|
||||
|
||||
it('slash should be properly escaped in regex format', function() {
|
||||
var result = _templateSrv.formatValue('Gi3/14', 'regex');
|
||||
expect(result).to.be('Gi3\\/14');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('can check if variable exists', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user