fix: Missing unencoding of search terms in url, related #6268

This commit is contained in:
Tom Moor
2023-12-10 21:30:30 -05:00
parent 0a2b559bbb
commit 9e9fedaff1

View File

@@ -27,6 +27,7 @@ import useStores from "~/hooks/useStores";
import { hover } from "~/styles";
import { SearchResult } from "~/types";
import { searchPath } from "~/utils/routeHelpers";
import { decodeURIComponentSafe } from "~/utils/urls";
import CollectionFilter from "./components/CollectionFilter";
import DateFilter from "./components/DateFilter";
import RecentSearches from "./components/RecentSearches";
@@ -52,7 +53,7 @@ function Search(props: Props) {
const recentSearchesCompositeRef = React.useRef<HTMLDivElement | null>(null);
// filters
const query = routeMatch.params.term ?? "";
const query = decodeURIComponentSafe(routeMatch.params.term ?? "");
const includeArchived = params.get("includeArchived") === "true";
const collectionId = params.get("collectionId") ?? undefined;
const userId = params.get("userId") ?? undefined;