fixed Metadata.Utils.scrub_html_and_truncate
This commit is contained in:
parent
ee0c40831e
commit
fa7d8e77e6
2 changed files with 34 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue