aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/metadata
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2021-05-22 16:44:51 -0500
committerAlex Gleason <alex@alexgleason.me>2021-05-29 12:29:11 -0500
commit3ff9c5e2a67ab83c2abdb14cd246dea059079e75 (patch)
treefeddf436d57db16e1d838f8c9d4ba31407baefb6 /lib/pleroma/web/metadata
parentb221d77a6da07c684bdbc63ddf4500e0d7ffeae8 (diff)
downloadpleroma-3ff9c5e2a67ab83c2abdb14cd246dea059079e75.tar.gz
Break out activity-specific HTML functions into Pleroma.Activity.HTML
Fixes cycles in lib/pleroma/ecto_type/activity_pub/object_validators/safe_text.ex
Diffstat (limited to 'lib/pleroma/web/metadata')
-rw-r--r--lib/pleroma/web/metadata/utils.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/metadata/utils.ex b/lib/pleroma/web/metadata/utils.ex
index de7195435..bc31d66b9 100644
--- a/lib/pleroma/web/metadata/utils.ex
+++ b/lib/pleroma/web/metadata/utils.ex
@@ -3,6 +3,7 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.Metadata.Utils do
+ alias Pleroma.Activity
alias Pleroma.Emoji
alias Pleroma.Formatter
alias Pleroma.HTML
@@ -13,7 +14,7 @@ defmodule Pleroma.Web.Metadata.Utils do
# html content comes from DB already encoded, decode first and scrub after
|> HtmlEntities.decode()
|> String.replace(~r/<br\s?\/?>/, " ")
- |> HTML.get_cached_stripped_html_for_activity(object, "metadata")
+ |> Activity.HTML.get_cached_stripped_html_for_activity(object, "metadata")
|> Emoji.Formatter.demojify()
|> HtmlEntities.decode()
|> Formatter.truncate()