Commit ac2eb1cd authored by winniehell's avatar winniehell

Escape ref and path for relative links (!6050)

parent a31a719a
...@@ -8,6 +8,7 @@ Please view this file on the master branch, on stable branches it's out of date. ...@@ -8,6 +8,7 @@ Please view this file on the master branch, on stable branches it's out of date.
- Fix extra space on Build sidebar on Firefox !7060 - Fix extra space on Build sidebar on Firefox !7060
- Fix HipChat notifications rendering (airatshigapov, eisnerd) - Fix HipChat notifications rendering (airatshigapov, eisnerd)
- Add hover to trash icon in notes !7008 (blackst0ne) - Add hover to trash icon in notes !7008 (blackst0ne)
- Escape ref and path for relative links !6050 (winniehell)
- Simpler arguments passed to named_route on toggle_award_url helper method - Simpler arguments passed to named_route on toggle_award_url helper method
- Fix: Backup restore doesn't clear cache - Fix: Backup restore doesn't clear cache
- Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests method - Use MergeRequestsClosingIssues cache data on Issue#closed_by_merge_requests method
......
...@@ -52,8 +52,8 @@ module Banzai ...@@ -52,8 +52,8 @@ module Banzai
relative_url_root, relative_url_root,
context[:project].path_with_namespace, context[:project].path_with_namespace,
uri_type(file_path), uri_type(file_path),
ref, Addressable::URI.escape(ref),
file_path Addressable::URI.escape(file_path)
].compact.join('/').squeeze('/').chomp('/') ].compact.join('/').squeeze('/').chomp('/')
uri uri
......
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