Mastodon API: Fake support for loading filters
[akkoma] / lib / pleroma / formatter.ex
index fc2c643daef7983e221cf48dd466611740c9d6d0..2b4c3c2aa561374c6fff3afdf0c819f5eb1f31bb 100644 (file)
@@ -154,15 +154,16 @@ defmodule Pleroma.Formatter do
           MediaProxy.url(file)
         }' />"
       )
+      |> HtmlSanitizeEx.basic_html()
     end)
   end
 
-  def get_emoji(nil), do: []
-
-  def get_emoji(text) do
+  def get_emoji(text) when is_binary(text) do
     Enum.filter(@emoji, fn {emoji, _} -> String.contains?(text, ":#{emoji}:") end)
   end
 
+  def get_emoji(_), do: []
+
   def get_custom_emoji() do
     @emoji
   end