]> jfr.im git - irc/quakenet/qwebirc.git/commitdiff
Merge.
authorChris Porter <redacted>
Sun, 12 Jan 2014 02:28:19 +0000 (02:28 +0000)
committerChris Porter <redacted>
Sun, 12 Jan 2014 02:28:19 +0000 (02:28 +0000)
js/ui/panes/options.js

index ff50c0ff0fa59b5e58fc62cec8b59411061d5cf4..851286cdb06ad4375e52b2ec294c607ea5e7e48b 100644 (file)
@@ -443,8 +443,12 @@ qwebirc.ui.SuppliedArgOptions = new Class({
       var checksum = arg.substr(arg.length - 2, 2);
       var decoded = qwebirc.util.b64Decode(arg.substr(0, arg.length - 2));
       
-      if(decoded && (new qwebirc.util.crypto.MD5().digest(decoded).slice(0, 2) == checksum))
-        p = qwebirc.util.parseURI("?" + decoded);
+      if(decoded && (new qwebirc.util.crypto.MD5().digest(decoded).slice(0, 2) == checksum)) {
+        var p2 = qwebirc.util.parseURI("?" + decoded);
+        for(var k in p2) {
+          p[k] = JSON.decode(p2[k], true);
+        }
+      }
     }
     
     this.parsedOptions = p;
@@ -464,7 +468,7 @@ qwebirc.ui.SuppliedArgOptions = new Class({
     var result = [];
     this.getOptionList().forEach(function(x) {
       if(x.settableByURL && x.default_ != x.value)
-        result.push(x.optionId + "=" + x.value);
+        result.push(x.optionId + "=" + JSON.encode(x.value));
     }.bind(this));
     
     var raw = result.join("&");