From 9f768cd3bc4bee34e5d447c589345f25c3392d63 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 26 Dec 2015 14:11:54 -0500 Subject: [PATCH] Minimum viable URL escaping in :Gbrowse Closes https://github.com/tpope/vim-fugitive/issues/703. --- plugin/fugitive.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ec5b6e6..e98eb5e 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -2275,6 +2275,7 @@ function! s:Browse(bang,line1,count,...) abort call s:throw("Instaweb failed to start and '".remote."' is not a supported remote") endif + let url = s:gsub(url, '[ <>]', '\="%".printf("%02X",char2nr(submatch(0)))') if a:bang if has('clipboard') let @* = url