scm: switch to use shell quote with parameter in abstract adapter target().

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5906 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-05-25 23:50:59 +00:00
parent 747e3c82f6
commit 793accb14a
1 changed files with 6 additions and 2 deletions

View File

@ -184,10 +184,14 @@ module Redmine
info ? info.root_url : nil
end
def target(path)
def target(path, sq=true)
path ||= ''
base = path.match(/^\//) ? root_url : url
shell_quote("#{base}/#{path}".gsub(/[?<>\*]/, ''))
str = "#{base}/#{path}".gsub(/[?<>\*]/, '')
if sq
str = shell_quote(str)
end
str
end
def logger