rizzatti / dash.vim

Search Dash.app from Vim
MIT License
995 stars 59 forks source link

Percent-escape query #18

Closed Kapeli closed 10 years ago

Kapeli commented 10 years ago

As far as I can tell at https://github.com/rizzatti/dash.vim/blob/master/autoload/dash.vim#L153, the query that is sent to Dash is not percent-escaped/url encoded (i.e. what you'd get at http://meyerweb.com/eric/tools/dencoder/). It's not a huge bug, but it will cause issues if the query contains the & character. At least & should be escaped.

rizzatti commented 10 years ago

That line gets expanded to $ open dash-plugin://'keys=python&query=word' which should behave appropriately with shell expansion. Besides, I do not let words with spaces or other non alpha numeric characters be queried from the plugin.

Kapeli commented 10 years ago

If users can't search for anything with & in it, it should be ok.