URL escape :command special characters

Handle the case where the :Browse or :OpenBrowser command we delegate to
is defined with -bar.
This commit is contained in:
Tim Pope
2021-04-03 18:31:34 -04:00
parent 1a765a46c1
commit d3341147ef

View File

@@ -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