fixed Metadata.Utils.scrub_html_and_truncate

This commit is contained in:
Maksim Pechnikov 2020-01-03 16:21:52 +03:00 committed by rinpatch
commit f486556346
2 changed files with 34 additions and 0 deletions

View file

@ -14,6 +14,7 @@ defmodule Pleroma.Web.Metadata.Utils do
|> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.get_cached_stripped_html_for_activity(object, "metadata")
|> Formatter.demojify()
|> HtmlEntities.decode()
|> Formatter.truncate()
end
@ -24,6 +25,7 @@ defmodule Pleroma.Web.Metadata.Utils do
|> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.strip_tags()
|> Formatter.demojify()
|> HtmlEntities.decode()
|> Formatter.truncate(max_length)
end