Strip html from emoji stuff.
This commit is contained in:
parent
5da2355e71
commit
fbe9aa3506
2 changed files with 7 additions and 1 deletions
|
|
@ -77,7 +77,11 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
|
|||
reply_to_user = reply_to && User.get_cached_by_ap_id(reply_to.data["actor"])
|
||||
|
||||
emojis = (activity.data["object"]["emoji"] || [])
|
||||
|> Enum.map(fn {name, url} -> %{ shortcode: name, url: url, static_url: url } end)
|
||||
|> Enum.map(fn {name, url} ->
|
||||
name = HtmlSanitizeEx.strip_tags(name)
|
||||
url = HtmlSanitizeEx.strip_tags(url)
|
||||
%{ shortcode: name, url: url, static_url: url }
|
||||
end)
|
||||
|
||||
%{
|
||||
id: to_string(activity.id),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue