Explorar el Código

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 hace 9 años
padre
commit
be8ec24106
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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) {