Hello all,
I found that regexEscape is not working for single value variable in rawQuery.
But if single value looks like this: www.somesite.com/some-link, influx return error. More about this issue is in topic Not escaping special characters in query text edit mode
In file github.com\grafana\grafana\public\app\plugins\datasource\influxdb\influx_query.ts function interpolateQueryStr is returning original value if variable is not multi or all:
interpolateQueryStr(value, variable, defaultFormatFn) {
// if no multi or include all do not regexEscape
if (!variable.multi && !variable.includeAll) {
return value;
}
if (typeof value === 'string') {
return kbn.regexEscape(value);
}
const escapedValues = _.map(value, kbn.regexEscape);
return '(' + escapedValues.join('|') + ')';
}
Is it bug or feature?