1 defmodule Pleroma.Web.ActivityPub.MRF.NormalizeMarkup do
4 @behaviour Pleroma.Web.ActivityPub.MRF
6 def filter(%{"type" => activity_type} = object) when activity_type == "Create" do
7 scrub_policy = Pleroma.Config.get([:mrf_normalize_markup, :scrub_policy])
9 child = object["object"]
13 |> HTML.filter_tags(scrub_policy)
15 child = Map.put(child, "content", content)
17 object = Map.put(object, "object", child)
22 def filter(object), do: {:ok, object}