Sfoglia il codice sorgente

templating(): minor update to regex escape chars, #2918

Torkel Ödegaard 9 anni fa
parent
commit
1ed4f64e60

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

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

+ 1 - 1
public/sass/utils/_validation.scss

@@ -2,6 +2,6 @@ input[type=text].ng-dirty.ng-invalid {
   box-shadow: inset 0 0px 7px $red;
 }
 
-form input.ng-invalid {
+input.ng-dirty.ng-invalid {
   color: $errorText;
 }