Manually escape '#' when building relative uris, fixes #42459
This commit is contained in:
parent
afd2d38111
commit
2824a72552
2 changed files with 6 additions and 1 deletions
5
changelogs/unreleased/fix-42459---in-branch.yml
Normal file
5
changelogs/unreleased/fix-42459---in-branch.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix relative uri when "#" is in branch name
|
||||
merge_request:
|
||||
author: Jan
|
||||
type: fixed
|
|
@ -84,7 +84,7 @@ module Banzai
|
|||
relative_url_root,
|
||||
project.full_path,
|
||||
uri_type(file_path),
|
||||
Addressable::URI.escape(ref),
|
||||
Addressable::URI.escape(ref).gsub('#', '%23'),
|
||||
Addressable::URI.escape(file_path)
|
||||
].compact.join('/').squeeze('/').chomp('/')
|
||||
|
||||
|
|
Loading…
Reference in a new issue