ソースを参照

Slash escape regex

Slash symbol "/" wasn't escaped when we chose variable from template dropdown, so we couldn't choose interface names like Gi9/10 when querying from influxdb.
simnv 10 年 前
コミット
be8ec24106
1 ファイル変更1 行追加1 行削除
  1. 1 1
      public/app/features/templating/templateSrv.js

+ 1 - 1
public/app/features/templating/templateSrv.js

@@ -35,7 +35,7 @@ function (angular, _) {
     };
     };
 
 
     function regexEscape(value) {
     function regexEscape(value) {
-      return value.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+      return value.replace(/[\\^$*+?.()|[\]{}\/]/g, '\\$&');
     }
     }
 
 
     function luceneEscape(value) {
     function luceneEscape(value) {