X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fviews%2Fstatus_view.ex;h=62b967e02ffe770aef4196c5a7168a2527487078;hb=09de76ad5af57c238188d41353232a872c6b30dc;hp=55675ae1c38b624f71db2e4df5ee76b020a0a0b4;hpb=000b3f1837d81f46e183f21150972c8c0b0a9115;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/views/status_view.ex b/lib/pleroma/web/mastodon_api/views/status_view.ex index 55675ae1c..62b967e02 100644 --- a/lib/pleroma/web/mastodon_api/views/status_view.ex +++ b/lib/pleroma/web/mastodon_api/views/status_view.ex @@ -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), @@ -127,6 +131,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do type = cond do String.contains?(media_type, "image") -> "image" String.contains?(media_type, "video") -> "video" + String.contains?(media_type, "audio") -> "audio" true -> "unknown" end