Skip to content
Snippets Groups Projects
Commit e4d18f32 authored by rinpatch's avatar rinpatch
Browse files

merge only if page_url is an absolute path

parent cbadf9d3
Branches
No related tags found
No related merge requests found
......@@ -186,8 +186,12 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
page_url_data = URI.parse(page_url)
image_url =
URI.merge(page_url_data, URI.parse(rich_media[:image]))
|> to_string
if %URI{host: nil} = page_url_data do
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment