diff options
author | anekos | 2015-04-20 22:41:55 +0900 |
---|---|---|
committer | anekos | 2015-04-20 22:45:47 +0900 |
commit | dc4effb65781e11cd48835f3b3f2c357c1367737 (patch) | |
tree | 174f91fbe1d4a7add185fb083efa14329cdc403b | |
parent | 0d14f1360cafc44f0ac92b7f039f845cc2c00c70 (diff) | |
download | vimperator-plugins-dc4effb65781e11cd48835f3b3f2c357c1367737.tar.bz2 |
デコード結果に q= などが含まると期待しない動作になるのを修正
-rw-r--r-- | google-exopen.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/google-exopen.js b/google-exopen.js index 4c1644a..b2436b2 100644 --- a/google-exopen.js +++ b/google-exopen.js @@ -24,10 +24,10 @@ let PLUGIN_INFO = xml` } // クエリ部の抜き出し - var q = decodeURI(url.href).match(/[?&]q=(.*?)&/); + var q = url.href.match(/[?&]q=(.*?)&/); // コマンドの引数 // foo+bar+hogeの形で取得されるので'+'を' 'で置き換え - var commandPram = q[1].replace(/\+/g,' '); + var commandPram = decodeURIComponent(q[1]).replace(/\+/g,' '); // コマンドの生成 var command = 'open ' + commandPram; |