aboutsummaryrefslogtreecommitdiffstats
path: root/google-exopen.js
diff options
context:
space:
mode:
authoranekos2015-04-20 22:41:55 +0900
committeranekos2015-04-20 22:45:47 +0900
commitdc4effb65781e11cd48835f3b3f2c357c1367737 (patch)
tree174f91fbe1d4a7add185fb083efa14329cdc403b /google-exopen.js
parent0d14f1360cafc44f0ac92b7f039f845cc2c00c70 (diff)
downloadvimperator-plugins-dc4effb65781e11cd48835f3b3f2c357c1367737.tar.bz2
デコード結果に q= などが含まると期待しない動作になるのを修正
Diffstat (limited to 'google-exopen.js')
-rw-r--r--google-exopen.js4
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;