mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-16 02:26:48 +01:00
merge only if page_url is an absolute path
This commit is contained in:
parent
cbadf9d333
commit
e4d18f328b
@ -186,8 +186,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||||||
page_url_data = URI.parse(page_url)
|
page_url_data = URI.parse(page_url)
|
||||||
|
|
||||||
image_url =
|
image_url =
|
||||||
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|
if %URI{host: nil} = page_url_data do
|
||||||
|> to_string
|
rich_media[:image]
|
||||||
|
else
|
||||||
|
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|
||||||
|
|> to_string
|
||||||
|
end
|
||||||
|
|
||||||
site_name = rich_media[:site_name] || page_url_data.host
|
site_name = rich_media[:site_name] || page_url_data.host
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user