From d3341147efc6a68d864b7384119a51e755e659b3 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sat, 3 Apr 2021 18:31:34 -0400 Subject: [PATCH] URL escape :command special characters Handle the case where the :Browse or :OpenBrowser command we delegate to is defined with -bar. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 720ff07..7e819c5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -6259,7 +6259,7 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo call s:throw("No GBrowse handler installed for '".raw."'") endif - let url = s:gsub(url, '[ <>]', '\="%".printf("%02X",char2nr(submatch(0)))') + let url = substitute(url, '[ <>\|"]', '\="%".printf("%02X",char2nr(submatch(0)))', 'g') if a:bang if has('clipboard') let @+ = url