Strip HTML in and allow emoji in summaries.
[akkoma] / lib / pleroma / web / twitter_api / views / activity_view.ex
index 469f780c7c9e80024237770221bce6cedd430274..9ba347d128b37cde89602e645bea9a5f0f6857ed 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.TwitterAPI.ActivityView do
@@ -285,7 +285,7 @@ defmodule Pleroma.Web.TwitterAPI.ActivityView do
       "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