From d5644a52aa4f031c69a2938b333636660156c703 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 24 Jan 2022 19:11:45 -0600 Subject: ForceMentionsInContent: wrap inline mentions with span tag --- lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex | 2 +- priv/scrubbers/default.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex b/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex index 8d3885d7b..97ea67002 100644 --- a/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex +++ b/lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex @@ -63,7 +63,7 @@ def filter(%{"type" => "Create", "object" => %{"type" => "Note", "to" => to}} = content = if added_mentions != "", - do: added_mentions <> " " <> content, + do: "#{added_mentions} " <> content, else: content {:ok, put_in(object["object"]["content"], content)} diff --git a/priv/scrubbers/default.ex b/priv/scrubbers/default.ex index 4694a92a5..f33a721a8 100644 --- a/priv/scrubbers/default.ex +++ b/priv/scrubbers/default.ex @@ -56,7 +56,7 @@ defmodule Pleroma.HTML.Scrubber.Default do Meta.allow_tag_with_these_attributes(:u, []) Meta.allow_tag_with_these_attributes(:ul, []) - Meta.allow_tag_with_this_attribute_values(:span, "class", ["h-card"]) + Meta.allow_tag_with_this_attribute_values(:span, "class", ["h-card", "recipients-inline"]) Meta.allow_tag_with_these_attributes(:span, []) Meta.allow_tag_with_this_attribute_values(:code, "class", ["inline"]) -- cgit v1.2.3