lib/vmail.vim in vmail-2.1.6 vs lib/vmail.vim in vmail-2.1.7
- old
+ new
@@ -691,11 +691,11 @@
if a:firstline < a:lastline
let lnum = a:firstline
while lnum <= a:lastline
let href = matchstr(getline(lnum), pattern)
if href != ""
- let command = s:browser_command . " '" . href . "' &"
+ let command = s:browser_command ." ".shellescape(href)." &"
call system(command)
let n += 1
endif
let lnum += 1
endwhile
@@ -704,18 +704,18 @@
end
let line = search(pattern, 'cw')
if line && a:all
while line
let href = matchstr(getline(line('.')), pattern)
- let command = s:browser_command . " '" . href . "' &"
+ let command = s:browser_command ." ".shellescape(href)." &"
call system(command)
let n += 1
let line = search('https\?:', 'W')
endwhile
echom 'opened '.n.' links'
else
let href = matchstr(getline(line('.')), pattern)
- let command = s:browser_command . " '" . href . "' &"
+ let command = s:browser_command ." ".shellescape(href)." &"
call system(command)
echom 'opened '.href
endif
endfunc