1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-18 10:59:17 +00:00

Strip HTML in and allow emoji in summaries.

This commit is contained in:
scarlett 2019-01-05 17:28:47 +00:00
parent eaaf701319
commit 0787f0dfbe
2 changed files with 2 additions and 2 deletions

View file

@ -124,7 +124,7 @@ def post(user, %{"status" => status} = data) do
Map.put(
object,
"emoji",
Formatter.get_emoji(status)
Formatter.get_emoji(status) ++ Formatter.get_emoji(data["spoiler_text"])
|> Enum.reduce(%{}, fn {name, file}, acc ->
Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
end)

View file

@ -285,7 +285,7 @@ def render(
"activity_type" => "post",
"possibly_sensitive" => possibly_sensitive,
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
"summary" => summary
"summary" => HTML.strip_tags(summary) |> Formatter.emojify(object["emoji"])
}
end