Handle relative URLs when fetching OEmbed/OpenGraph cards (#8669)
This commit is contained in:
parent
25dd523887
commit
bd9e47e9be
2 changed files with 11 additions and 9 deletions
|
@ -31,7 +31,7 @@ class FetchOEmbedService
|
|||
|
||||
return if @endpoint_url.blank?
|
||||
|
||||
@endpoint_url = Addressable::URI.parse(@endpoint_url).to_s
|
||||
@endpoint_url = (Addressable::URI.parse(@url) + @endpoint_url).to_s
|
||||
rescue Addressable::URI::InvalidURIError
|
||||
@endpoint_url = nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue