You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by pu...@apache.org on 2012/06/21 02:00:56 UTC
[2/12] js commit: [#CB-838] escape and encode data before saving,
unescape + decode on retrieval
[#CB-838] escape and encode data before saving, unescape + decode on retrieval
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/f666498b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/f666498b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/f666498b
Branch: refs/heads/master
Commit: f666498b0e90562d76450048401da8973fb5d70f
Parents: 64fd520
Author: Jesse MacFadyen <pu...@gmail.com>
Authored: Thu Jun 14 11:01:28 2012 -0700
Committer: Jesse MacFadyen <pu...@gmail.com>
Committed: Thu Jun 14 11:01:28 2012 -0700
----------------------------------------------------------------------
lib/wp7/plugin/wp7/DOMStorage.js | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/f666498b/lib/wp7/plugin/wp7/DOMStorage.js
----------------------------------------------------------------------
diff --git a/lib/wp7/plugin/wp7/DOMStorage.js b/lib/wp7/plugin/wp7/DOMStorage.js
index 842902a..34f9b95 100644
--- a/lib/wp7/plugin/wp7/DOMStorage.js
+++ b/lib/wp7/plugin/wp7/DOMStorage.js
@@ -84,7 +84,7 @@
var retVal = null;
if(this.keys.indexOf(key) > -1) {
window.external.Notify("DOMStorage/" + this._type + "/get/" + key);
- retVal = this._result;
+ retVal = unescape(decodeURIComponent(this._result));
this._result = null;
}
return retVal;
@@ -101,7 +101,7 @@
if(!this.keys) {
this.initialize();
}
- window.external.Notify("DOMStorage/" + this._type + "/set/" + key + "/" + value);
+ window.external.Notify("DOMStorage/" + this._type + "/set/" + key + "/" + encodeURIComponent(escape(value)));
},
/*