From 2ea93d6bcd76ae95c2f494cce397fad95947a5ff Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Tue, 31 Jan 2023 15:31:18 +0000 Subject: [PATCH] fix: slightly better regex --- client/src/app/pages/dashboard/users/UserPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/pages/dashboard/users/UserPage.tsx b/client/src/app/pages/dashboard/users/UserPage.tsx index 57ae7fbfb..658f63224 100644 --- a/client/src/app/pages/dashboard/users/UserPage.tsx +++ b/client/src/app/pages/dashboard/users/UserPage.tsx @@ -29,7 +29,7 @@ export default function UserPage({ reqUser }: Props) { } function InferLinks(aboutMe: string) { - return aboutMe.replace(/(https?:\/\/[^\s]+)(\s)/gu, "[$1]($1)$2"); + return aboutMe.replace(/(https?:\/\/[a-zA-Z0-9-._~?&=]+)(\s*)/gu, "[$1]($1)$2"); } function AboutMeCard({ reqUser }: Props) {