From dc4effb65781e11cd48835f3b3f2c357c1367737 Mon Sep 17 00:00:00 2001 From: anekos Date: Mon, 20 Apr 2015 22:41:55 +0900 Subject: デコード結果に q= などが含まると期待しない動作になるのを修正 --- google-exopen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'google-exopen.js') 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; -- cgit v1.2.3