From c5eca8ffb26f5ecbdec212e5e1c352ae9dd8e28d Mon Sep 17 00:00:00 2001 From: Echo Date: Fri, 14 Nov 2025 15:11:41 +0100 Subject: [PATCH] Fix error with remote tags including percent signs (#36886) --- .../mastodon/components/status/handled_link.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/javascript/mastodon/components/status/handled_link.tsx b/app/javascript/mastodon/components/status/handled_link.tsx index be816e98531..43763d9c32c 100644 --- a/app/javascript/mastodon/components/status/handled_link.tsx +++ b/app/javascript/mastodon/components/status/handled_link.tsx @@ -27,12 +27,14 @@ export const HandledLink: FC> = ({ }) => { // Handle hashtags if ( - text.startsWith('#') || - prevText?.endsWith('#') || - text.startsWith('#') || - prevText?.endsWith('#') + (text.startsWith('#') || + prevText?.endsWith('#') || + text.startsWith('#') || + prevText?.endsWith('#')) && + !text.includes('%') ) { const hashtag = text.slice(1).trim(); + return ( > = ({ return (