X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fformatter.ex;h=62f54a3f255e2e74d5e7c6dc7dfa7ff1f83d4e46;hb=cd13fa17fd8d2c959b4a257a3bdcf52e7f61ddf2;hp=e5ccc7a493cee9f60a67a12b16cda6ca709b62b6;hpb=4257f784bc8e742888e978fccbab0f566c549376;p=akkoma diff --git a/lib/pleroma/formatter.ex b/lib/pleroma/formatter.ex index e5ccc7a49..62f54a3f2 100644 --- a/lib/pleroma/formatter.ex +++ b/lib/pleroma/formatter.ex @@ -1,6 +1,7 @@ defmodule Pleroma.Formatter do alias Pleroma.User alias Pleroma.Web.MediaProxy + alias Pleroma.HTML @tag_regex ~r/\#\w+/u def parse_tags(text, data \\ %{}) do @@ -144,8 +145,8 @@ defmodule Pleroma.Formatter do def emojify(text, emoji) do Enum.reduce(emoji, text, fn {emoji, file}, text -> - emoji = HtmlSanitizeEx.strip_tags(emoji) - file = HtmlSanitizeEx.strip_tags(file) + emoji = HTML.strip_tags(emoji) + file = HTML.strip_tags(file) String.replace( text, @@ -154,6 +155,7 @@ defmodule Pleroma.Formatter do MediaProxy.url(file) }' />" ) + |> HTML.filter_tags() end) end