Strip HTML in and allow emoji in summaries.
This commit is contained in:
parent
eaaf701319
commit
0787f0dfbe
@ -124,7 +124,7 @@ defmodule Pleroma.Web.CommonAPI do
|
|||||||
Map.put(
|
Map.put(
|
||||||
object,
|
object,
|
||||||
"emoji",
|
"emoji",
|
||||||
Formatter.get_emoji(status)
|
Formatter.get_emoji(status) ++ Formatter.get_emoji(data["spoiler_text"])
|
||||||
|> Enum.reduce(%{}, fn {name, file}, acc ->
|
|> Enum.reduce(%{}, fn {name, file}, acc ->
|
||||||
Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
|
Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
|
||||||
end)
|
end)
|
||||||
|
@ -285,7 +285,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
|
|||||||
"activity_type" => "post",
|
"activity_type" => "post",
|
||||||
"possibly_sensitive" => possibly_sensitive,
|
"possibly_sensitive" => possibly_sensitive,
|
||||||
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
"visibility" => Pleroma.Web.MastodonAPI.StatusView.get_visibility(object),
|
||||||
"summary" => summary
|
"summary" => HTML.strip_tags(summary) |> Formatter.emojify(object["emoji"])
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user