Commit 25664f89 authored by Sean McGivern's avatar Sean McGivern

Don't include a double slash when rewriting the URL

parent 827712e7
......@@ -22,7 +22,10 @@ module Gitlab
markdown_text.gsub(MARKDOWN_SIMPLE_IMAGE) do
if $~[:image]
"![#{$~[:title]}](#{Gitlab.config.gitlab.url}/#{$~[:url]})"
url = $~[:url]
url = "/#{url}" unless url.start_with?('/')
"![#{$~[:title]}](#{Gitlab.config.gitlab.url}#{url})"
else
$~[0]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment