logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git
commit: d5644a52aa4f031c69a2938b333636660156c703
parent 1bbc701a3ababc4c6e856ad24f8826da0a0ba1a3
Author: Alex Gleason <alex@alexgleason.me>
Date:   Mon, 24 Jan 2022 19:11:45 -0600

ForceMentionsInContent: wrap inline mentions with span tag

Diffstat:

Mlib/pleroma/web/activity_pub/mrf/force_mentions_in_content.ex2+-
Mpriv/scrubbers/default.ex2+-
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 @@ -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 @@ -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"])