python-rope / ropevim

vim mode that uses rope library to provide features like python refactorings and code-assists
GNU General Public License v2.0
245 stars 34 forks source link

echo function doesn't escape quotes #59

Closed chrisphilip322 closed 7 years ago

chrisphilip322 commented 7 years ago

https://github.com/python-rope/ropevim/blob/master/ropevim.py#L394

The echo function doesn't sanitize its input, so if you preview a replace and there are double quotes in the diff, it breaks...

I fixed it by replacing vim.command('echo... with print(message) but there is probably a reason you want to use vim echo, but quotes should be escaped instead of eval'ing arbitrary parts of the file.