diff options
author | Alex Gleason <alex@alexgleason.me> | 2022-01-24 19:11:45 -0600 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2022-01-24 19:11:45 -0600 |
commit | d5644a52aa4f031c69a2938b333636660156c703 (patch) | |
tree | 2e4223fe925423b4e8df207fd3915f5b79ba6aad | |
parent | 1bbc701a3ababc4c6e856ad24f8826da0a0ba1a3 (diff) | |
download | pleroma-d5644a52aa4f031c69a2938b333636660156c703.tar.gz |
ForceMentionsInContent: wrap inline mentions with span tag
-rw-r--r-- | lib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex | 2 | ||||
-rw-r--r-- | 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 @@ defmodule Pleroma.Web.ActivityPub.MRF.ForceMentionsInContent do content = if added_mentions != "", - do: added_mentions <> " " <> content, + do: "<span class=\"recipients-inline\">#{added_mentions} </span>" <> 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"]) |