Skip to content

Commit 5f8f9e2

Browse files
authored
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 <[email protected]>
1 parent 4212c59 commit 5f8f9e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/thread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ async def send(
10011001
attachments.append(attachment)
10021002

10031003
image_urls = re.findall(
1004-
r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$\-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
1004+
r"http[s]?:\/\/(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*(),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+",
10051005
message.content,
10061006
)
10071007

0 commit comments

Comments
 (0)