aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/metadata
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-01-18 10:28:19 +0300
committerrinpatch <rinpatch@sdf.org>2019-01-18 10:28:19 +0300
commit997f4a5e09f8531f95ba3f13986b9dda583d046a (patch)
tree219c4450b7e4c0f9c5ce38ebda992052f7bc4730 /lib/pleroma/web/metadata
parent1b1af4798a74c4ab357140ef2c5928dd9ebd3221 (diff)
downloadpleroma-997f4a5e09f8531f95ba3f13986b9dda583d046a.tar.gz
Remove custom emojis and trailing whitespaces from previews
Diffstat (limited to 'lib/pleroma/web/metadata')
-rw-r--r--lib/pleroma/web/metadata/opengraph.ex2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex
index 43303859c..1028e35c2 100644
--- a/lib/pleroma/web/metadata/opengraph.ex
+++ b/lib/pleroma/web/metadata/opengraph.ex
@@ -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