Remove custom emojis and trailing whitespaces from previews
This commit is contained in:
parent
1b1af4798a
commit
997f4a5e09
3 changed files with 20 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue