MRF InlineQuotePolicy: Don't inline quoted post URL in Mastodon quotes

This commit is contained in:
Phantasm 2025-11-29 17:12:32 +00:00 committed by nicole mikołajczyk
commit 5cb141a54e
4 changed files with 114 additions and 0 deletions

View file

@ -18,6 +18,8 @@ defmodule Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy do
content =~ quote_url -> true
# Does the content already have a .quote-inline span?
content =~ "<span class=\"quote-inline\">" -> true
# Does the content already have a .quote-inline p? (Mastodon)
content =~ "<p class=\"quote-inline\">" -> true
# No inline quote found
true -> false
end