Fix escaping of regular expressions in VC builder
Change-Id: I172c83fcb7ebb0943b23106891c57aeadca0a1f8
diff --git a/dev/js/src/vc/stringval.js b/dev/js/src/vc/stringval.js
index c7a5d67..595057a 100644
--- a/dev/js/src/vc/stringval.js
+++ b/dev/js/src/vc/stringval.js
@@ -36,10 +36,10 @@
regex : function (bool) {
if (arguments.length === 1) {
if (bool) {
- this._regex = true;
+ this._regex = true;
}
else {
- this._regex = false;
+ this._regex = false;
};
this._update();
};
@@ -128,8 +128,8 @@
re.addEventListener(
'click',
function (e) {
- this.toggleRegex();
- e.halt();
+ this.toggleRegex();
+ e.halt();
}.bind(this),
true
);
@@ -138,19 +138,19 @@
e.addEventListener(
'blur',
function (e) {
- this.store(this.value(), this.regex());
- e.halt();
+ this.store(this.value(), this.regex());
+ e.halt();
}.bind(this)
);
this._input.addEventListener(
'keypress',
function (e) {
- if (e.keyCode == 13) {
- this.value(this._input.value);
- this.store(this.value(), this.regex());
+ if (e.keyCode == 13) {
+ this.value(this._input.value);
+ this.store(this.value(), this.regex());
return false;
- };
+ };
}.bind(this)
);