Tweak mention format to show the full handle

This commit is contained in:
Thomas Sileo 2022-08-11 20:27:17 +02:00
parent 0696268d0b
commit 81c2ef8961
2 changed files with 6 additions and 1 deletions

View File

@ -61,7 +61,7 @@ async def _mentionify(
mentioned_actors.append(actor)
tags.append(dict(type="Mention", href=actor.ap_id, name=mention))
link = f'<span class="h-card"><a href="{actor.url}" class="u-url mention">@{username}</a></span>' # noqa: E501
link = f'<span class="h-card"><a href="{actor.url}" class="u-url mention">{actor.handle}</a></span>' # noqa: E501
content = content.replace(mention, link)
return content, tags, mentioned_actors

View File

@ -177,6 +177,11 @@ ALLOWED_TAGS = [
]
ALLOWED_CSS_CLASSES = [
# microformats
"h-card",
"u-url",
"mention",
# code highlighting
"highlight",
"codehilite",
"hll",