From 81c2ef8961e8f2242055b217aa0d50da5798b1eb Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Thu, 11 Aug 2022 20:27:17 +0200 Subject: [PATCH] Tweak mention format to show the full handle --- app/source.py | 2 +- app/templates.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/source.py b/app/source.py index 4324c2b..b555ceb 100644 --- a/app/source.py +++ b/app/source.py @@ -61,7 +61,7 @@ async def _mentionify( mentioned_actors.append(actor) tags.append(dict(type="Mention", href=actor.ap_id, name=mention)) - link = f'@{username}' # noqa: E501 + link = f'{actor.handle}' # noqa: E501 content = content.replace(mention, link) return content, tags, mentioned_actors diff --git a/app/templates.py b/app/templates.py index de3c5d1..c1f4ec1 100644 --- a/app/templates.py +++ b/app/templates.py @@ -177,6 +177,11 @@ ALLOWED_TAGS = [ ] ALLOWED_CSS_CLASSES = [ + # microformats + "h-card", + "u-url", + "mention", + # code highlighting "highlight", "codehilite", "hll",