aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/metadata
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-01-15 20:00:21 +0300
committerrinpatch <rinpatch@sdf.org>2019-01-15 20:00:21 +0300
commitff6c9a5c961647b64c3c9fcc05932093595e9588 (patch)
tree94beff0bc49c876864fdbaeea6f7c42256152f3b /lib/pleroma/web/metadata
parent850912b06b64818c069b8f169242f0106b73bbfe (diff)
downloadpleroma-ff6c9a5c961647b64c3c9fcc05932093595e9588.tar.gz
Introduce get_by_id in Activity, replace newlines with spaces
Diffstat (limited to 'lib/pleroma/web/metadata')
-rw-r--r--lib/pleroma/web/metadata/opengraph.ex1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/pleroma/web/metadata/opengraph.ex b/lib/pleroma/web/metadata/opengraph.ex
index 5f8bed2fb..6d86c0ee6 100644
--- a/lib/pleroma/web/metadata/opengraph.ex
+++ b/lib/pleroma/web/metadata/opengraph.ex
@@ -47,6 +47,7 @@ defmodule Pleroma.Web.Metadata.Providers.OpenGraph do
content
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
+ |> String.replace(~r/<br\s?\/?>/, " ")
|> HTML.strip_tags()
|> Formatter.truncate()
end