mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Ensure uri components are decoded (#11920)
This commit is contained in:
parent
2d4d1584fd
commit
187d98a153
@ -109,9 +109,15 @@ export function useSearchEffect(
|
||||
|
||||
const params = location.search.substring(1).split("&");
|
||||
|
||||
return params
|
||||
const foundParam = params
|
||||
.find((p) => p.includes("=") && p.split("=")[0] == key)
|
||||
?.split("=");
|
||||
|
||||
if (foundParam && foundParam.length === 2) {
|
||||
return [foundParam[0], decodeURIComponent(foundParam[1])];
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}, [location, key]);
|
||||
|
||||
useEffect(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user