Skip to content

Commit 948b417

Browse files
committed
Fix the url regex
1 parent dc979dc commit 948b417

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/thread.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,7 @@ async def send(
510510
image_links = [
511511
(link, None)
512512
for link in re.findall(
513-
r"https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)",
514-
message.content,
513+
r"https?://(?:[-\w.]|(?:%[\da-fA-F]{2}))+", message.content
515514
)
516515
]
517516

0 commit comments

Comments
 (0)