Преглед изворни кода

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 година
родитељ
комит
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) {