Remove custom emojis and trailing whitespaces from previews

This commit is contained in:
rinpatch 2019-01-18 10:28:19 +03:00
commit 997f4a5e09
3 changed files with 20 additions and 5 deletions

View file

@ -124,6 +124,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
|> HtmlEntities.decode()
|> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.get_cached_stripped_html_for_object(object, __MODULE__)
|> Formatter.demojify()
|> Formatter.truncate()
end
@ -133,6 +134,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
|> HtmlEntities.decode()
|> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.strip_tags()
|> Formatter.demojify()
|> Formatter.truncate()
end