diff options
Diffstat (limited to 'lib/pleroma/web')
-rw-r--r-- | lib/pleroma/web/metadata/opengraph.ex | 1 | ||||
-rw-r--r-- | lib/pleroma/web/ostatus/ostatus_controller.ex | 3 |
2 files changed, 2 insertions, 2 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 diff --git a/lib/pleroma/web/ostatus/ostatus_controller.ex b/lib/pleroma/web/ostatus/ostatus_controller.ex index be648a6ee..2a47519d1 100644 --- a/lib/pleroma/web/ostatus/ostatus_controller.ex +++ b/lib/pleroma/web/ostatus/ostatus_controller.ex @@ -7,7 +7,6 @@ defmodule Pleroma.Web.OStatus.OStatusController do alias Pleroma.{User, Activity, Object} alias Pleroma.Web.OStatus.{FeedRepresenter, ActivityRepresenter} - alias Pleroma.Repo alias Pleroma.Web.{OStatus, Federator} alias Pleroma.Web.XML alias Pleroma.Web.ActivityPub.ObjectView @@ -141,7 +140,7 @@ defmodule Pleroma.Web.OStatus.OStatusController do end def notice(conn, %{"id" => id}) do - with {_, %Activity{} = activity} <- {:activity, Repo.get(Activity, id)}, + with {_, %Activity{} = activity} <- {:activity, Activity.get_by_id(id)}, {_, true} <- {:public?, ActivityPub.is_public?(activity)}, %User{} = user <- User.get_cached_by_ap_id(activity.data["actor"]) do case format = get_format(conn) do |