Skip to content

Commit

Permalink
fix: remote user search (#1818)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeharding authored Jan 19, 2025
1 parent c9eec10 commit e8a558c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/features/search/SearchOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export default function SearchOptions({ search }: SearchOptionsProps) {
const { determineObjectTypeFromUrl, redirectToLemmyObjectIfNeeded } =
useLemmyUrlHandler();

const sanitizedUserURI = search.replace(/|\/|#|\?|\\/g, "").replace(/^@/, "");
const sanitizedUserURI = search
.replace(/\/|#|\?|\\|%/g, "")
.replace(/^@/, "");

const type = useMemo(
() => determineObjectTypeFromUrl(search),
Expand Down Expand Up @@ -69,7 +71,7 @@ export default function SearchOptions({ search }: SearchOptionsProps) {

<IonItem
routerLink={buildGeneralBrowseLink(
buildUserLinkFromHandle(encodeURIComponent(sanitizedUserURI)),
buildUserLinkFromHandle(sanitizedUserURI),
)}
>
<IonIcon icon={personOutline} color="primary" slot="start" />
Expand Down

0 comments on commit e8a558c

Please sign in to comment.