diff --git a/public/app/features/templating/adhoc_variable.ts b/public/app/features/templating/adhoc_variable.ts index 2cf4ccb2331..f3ff80acfc8 100644 --- a/public/app/features/templating/adhoc_variable.ts +++ b/public/app/features/templating/adhoc_variable.ts @@ -67,11 +67,11 @@ export class AdhocVariable implements Variable { } escapeDelimiter(value) { - return value.replace('|', '__gfpipe'); + return value.replace('|', '__gfp__'); } unescapeDelimiter(value) { - return value.replace('__gfpipe', '|'); + return value.replace('__gfp__', '|'); } setFilters(filters: any[]) { diff --git a/public/app/features/templating/specs/adhoc_variable_specs.ts b/public/app/features/templating/specs/adhoc_variable_specs.ts index 662b5623641..c9246941309 100644 --- a/public/app/features/templating/specs/adhoc_variable_specs.ts +++ b/public/app/features/templating/specs/adhoc_variable_specs.ts @@ -15,7 +15,7 @@ describe('AdhocVariable', function() { ] }); var urlValue = variable.getValueForUrl(); - expect(urlValue).to.eql(["key1|=|value1", "key2|!=|value2", "key3|=|value3a__gfpipevalue3b"]); + expect(urlValue).to.eql(["key1|=|value1", "key2|!=|value2", "key3|=|value3a__gfp__value3b"]); }); }); @@ -24,7 +24,7 @@ describe('AdhocVariable', function() { it('should restore filters', function() { var variable = new AdhocVariable({}); - variable.setValueFromUrl(["key1|=|value1", "key2|!=|value2", "key3|=|value3a__gfpipevalue3b"]); + variable.setValueFromUrl(["key1|=|value1", "key2|!=|value2", "key3|=|value3a__gfp__value3b"]); expect(variable.filters[0].key).to.be('key1'); expect(variable.filters[0].operator).to.be('=');