Skip to content

Commit 20c652b

Browse files
committed
Proper url regex
1 parent 948b417 commit 20c652b

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
@@ -510,7 +510,7 @@ async def send(
510510
image_links = [
511511
(link, None)
512512
for link in re.findall(
513-
r"https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+", message.content
513+
r"http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+", message.content
514514
)
515515
]
516516

0 commit comments

Comments
 (0)