Просмотр исходного кода

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 9 лет назад
Родитель
Сommit
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) {
-      return value.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&');
+      return value.replace(/[\\^$*+?.()|[\]{}\/]/g, '\\$&');
     }
 
     function luceneEscape(value) {