summaryrefslogtreecommitdiff
path: root/itjs/state.js
diff options
context:
space:
mode:
authorUrban Müller2013-06-26 13:16:03 +0000
committerUrban Müller2013-06-26 13:16:03 +0000
commit54abf987f6d5a8a7a3225729e47d9c5ca5281b9b (patch)
tree86ea3ab813cbd97ef9a6681f5047af9da175c252 /itjs/state.js
parent96c2a7f12a13338ba1fd25a031a5201a49bf3a3b (diff)
downloaditools-54abf987f6d5a8a7a3225729e47d9c5ca5281b9b.tar.gz
itools-54abf987f6d5a8a7a3225729e47d9c5ca5281b9b.tar.bz2
itools-54abf987f6d5a8a7a3225729e47d9c5ca5281b9b.zip
fix for "use strict"
Diffstat (limited to 'itjs/state.js')
-rw-r--r--itjs/state.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/itjs/state.js b/itjs/state.js
index 19f7438..81156f1 100644
--- a/itjs/state.js
+++ b/itjs/state.js
@@ -108,7 +108,7 @@ store_state: function()
{
var value = this[key], type = typeof(value);
if (!key.match(/^it_/) && type.match(/boolean|number|string/))
- ser[ser.length] = key + ':' + ((type == 'string') ? "'" + value.replace(/([\\'])/g, '\\\1') + "'" : value);
+ ser[ser.length] = key + ':' + ((type == 'string') ? "'" + value.replace(/([\\'])/g, '\\$1') + "'" : value); // escape backslashes and single quotes
}
this.it_history_field.value = ser.join(',');