diff --git a/client/src/app/pages/dashboard/users/UserPage.tsx b/client/src/app/pages/dashboard/users/UserPage.tsx index 001f6011a..d38834886 100644 --- a/client/src/app/pages/dashboard/users/UserPage.tsx +++ b/client/src/app/pages/dashboard/users/UserPage.tsx @@ -20,6 +20,10 @@ export default function UserPage({ reqUser }: Props) { return ; } +function InferLinks(aboutMe: string) { + return aboutMe.replace(/(https?:\/\/[^\s]+)(\s)/gu, "[$1]($1)$2"); +} + function AboutMeCard({ reqUser }: Props) { const { user } = useContext(UserContext); @@ -110,7 +114,7 @@ function AboutMeCard({ reqUser }: Props) { )} - {content} + {InferLinks(content)} ); }