Merge branch 'fix/status-view/expires_at' into 'develop'
[akkoma] / lib / pleroma / web / activity_pub / mrf / anti_link_spam_policy.ex
index 8abe18e29530db74d58b4d9766c209d4026b4109..802d10edcdc63daf23d9a3a79719cae3db1ad706 100644 (file)
@@ -17,6 +17,7 @@ defmodule Pleroma.Web.ActivityPub.MRF.AntiLinkSpamPolicy do
   # does the post contain links?
   defp contains_links?(%{"content" => content} = _object) do
     content
+    |> Floki.parse_fragment!()
     |> Floki.filter_out("a.mention,a.hashtag,a[rel~=\"tag\"],a.zrl")
     |> Floki.attribute("a", "href")
     |> length() > 0