From 5f8f9e2fcc4f0d4de6c3d871e4f2246be4414c09 Mon Sep 17 00:00:00 2001 From: Zallom Date: Sun, 1 Jun 2025 02:06:56 +0200 Subject: [PATCH] Fix: Image url regex in thread send method Revert image URL regex change in thread.py. The current regex only matches the protocol and domain, and no longer validates full image URLs. Signed-off-by: Zallom --- core/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/thread.py b/core/thread.py index 00060ab7f5..f5ccfedffd 100644 --- a/core/thread.py +++ b/core/thread.py @@ -1001,7 +1001,7 @@ async def send( attachments.append(attachment) image_urls = re.findall( - r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$\-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", + r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", message.content, )