Merge branch 'issue/1487' into 'develop'

[#1487] fixed clear  HTML entities after scrub html and truncate

See merge request pleroma/pleroma!2090
This commit is contained in:
feld 2020-01-12 17:25:25 +00:00
commit ea4a462858
2 changed files with 34 additions and 0 deletions

View file

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