diff --git a/src/soapbox/components/status-content.tsx b/src/soapbox/components/status-content.tsx index b9becbaaa..4e8989c1c 100644 --- a/src/soapbox/components/status-content.tsx +++ b/src/soapbox/components/status-content.tsx @@ -89,10 +89,10 @@ const StatusContent: React.FC = ({ return (); } else if (node.attribs.href) { // User is not present in database, construct acct from url - const matches = [...node.attribs.href.matchAll(/^http(?:s)?:\/\/(\S+)\/@(\S+)/gm)][0]; + const matches = [...node.attribs.href.matchAll(/^http(?:s)?:\/\/((?:[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,})\/(?:@|users?\/)(\S+)/gm)][0]; if (matches) { - return (); + return (); } } }