Turn on markup normalisation by default
[akkoma] / lib / pleroma / web / activity_pub / mrf.ex
index 7b7f446468e7f377107d9391a99b116dfb16b878..064ffc527adef1b085a334255ad3897b32b8f2e5 100644 (file)
@@ -140,7 +140,8 @@ defmodule Pleroma.Web.ActivityPub.MRF do
     |> get_policies()
     |> Enum.concat([
       Pleroma.Web.ActivityPub.MRF.HashtagPolicy,
-      Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy
+      Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy,
+      Pleroma.Web.ActivityPub.MRF.NormalizeMarkup
     ])
     |> Enum.uniq()
   end
@@ -154,6 +155,8 @@ defmodule Pleroma.Web.ActivityPub.MRF do
   # - https://extra.baddomain.net/
   # Does NOT match the following:
   # - https://maybebaddomain.net/
+  def subdomain_regex("*." <> domain), do: subdomain_regex(domain)
+
   def subdomain_regex(domain) do
     ~r/^(.+\.)?#{Regex.escape(domain)}$/i
   end