diff options
author | Sean McGivern <sean@gitlab.com> | 2019-07-01 12:24:04 +0000 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-07-01 12:24:04 +0000 |
commit | 8c59b4d7df47e1cbc91ffa075a968bb89f9ddc03 (patch) | |
tree | 199f61499794654b1e7e5723359e44d0ab197d69 /lib | |
parent | d3cc7b194d668a382886f559628ce849aa0a1f22 (diff) | |
parent | 0e341a6e58fc3afca20781cf1f4cbf214b9503ba (diff) | |
download | gitlab-ce-8c59b4d7df47e1cbc91ffa075a968bb89f9ddc03.tar.gz |
Merge branch 'sh-fix-issue-63910' into 'master'
Fix attachments using the wrong URLs in e-mails
Closes #63910
See merge request gitlab-org/gitlab-ce!30197
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/relative_link_filter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/banzai/filter/relative_link_filter.rb b/lib/banzai/filter/relative_link_filter.rb index 80c84c0f622..88836e12e61 100644 --- a/lib/banzai/filter/relative_link_filter.rb +++ b/lib/banzai/filter/relative_link_filter.rb @@ -56,10 +56,10 @@ module Banzai def process_link_to_upload_attr(html_attr) path_parts = [Addressable::URI.unescape(html_attr.value)] - if group - path_parts.unshift(relative_url_root, 'groups', group.full_path, '-') - elsif project + if project path_parts.unshift(relative_url_root, project.full_path) + elsif group + path_parts.unshift(relative_url_root, 'groups', group.full_path, '-') else path_parts.unshift(relative_url_root) end |