From 48174d84a441c60bd5bdc8569bc513b649667a57 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Mon, 19 Dec 2022 00:27:05 +0000 Subject: [PATCH] Don't linkify mentions inside links --- activities/models/post.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activities/models/post.py b/activities/models/post.py index 17985fb..3c3f50c 100644 --- a/activities/models/post.py +++ b/activities/models/post.py @@ -321,7 +321,7 @@ class Post(StatorModel): PostTypeData.parse_obj(value) mention_regex = re.compile( - r"(^|[^\w\d\-_])@([\w\d\-_]+(?:@[\w\d\-_]+\.[\w\d\-_\.]+)?)" + r"(^|[^\w\d\-_/])@([\w\d\-_]+(?:@[\w\d\-_]+\.[\w\d\-_\.]+)?)" ) def linkify_mentions(self, content: str, local: bool = False) -> str: