Fix to normalize url included in status
This commit is contained in:
parent
be5e117c97
commit
0a631da089
1 changed files with 10 additions and 2 deletions
|
@ -379,8 +379,16 @@ class Formatter
|
|||
html.html_safe # rubocop:disable Rails/OutputSafety
|
||||
end
|
||||
|
||||
def normalize_url_without_fragment(url)
|
||||
return if url.nil?
|
||||
|
||||
uri = Addressable::URI.parse(url).normalize
|
||||
uri.fragment = nil
|
||||
uri.to_s
|
||||
end
|
||||
|
||||
def url_to_holding_account(url)
|
||||
url = url.split('#').first
|
||||
url = normalize_url_without_fragment(url)
|
||||
|
||||
return if url.nil?
|
||||
|
||||
|
@ -388,7 +396,7 @@ class Formatter
|
|||
end
|
||||
|
||||
def url_to_holding_status(url)
|
||||
url = url.split('#').first
|
||||
url = normalize_url_without_fragment(url)
|
||||
|
||||
return if url.nil?
|
||||
|
||||
|
|
Loading…
Reference in a new issue