masto api: run emojis through mediaproxy

fixes 
This commit is contained in:
Morgan Bazalgette 2018-04-02 12:04:11 +02:00
parent 7130e9ddb1
commit 5e4bb4ad92
No known key found for this signature in database
GPG key ID: 40D328300D245DA5

View file

@ -125,7 +125,11 @@ def render("status.json", %{activity: %{data: %{"object" => object}} = activity}
(activity.data["object"]["emoji"] || [])
|> Enum.map(fn {name, url} ->
name = HtmlSanitizeEx.strip_tags(name)
url = HtmlSanitizeEx.strip_tags(url)
url =
HtmlSanitizeEx.strip_tags(url)
|> MediaProxy.url()
%{shortcode: name, url: url, static_url: url}
end)