Skip to content

Commit

Permalink
fix: no search results displayed when filter name contains special ch…
Browse files Browse the repository at this point in the history
…aracters (#885)
  • Loading branch information
MoritzRS authored Sep 24, 2021
1 parent 8222f8d commit 5f628d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/core/utils/url-form-params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function appendFormParamsToHttpParams(
return object
? Object.entries(object)
.filter(([, value]) => Array.isArray(value) && value.length)
.reduce((p, [key, val]) => p.set(decodeURI(key), val.map(decodeURI).join(separator)), params)
.reduce((p, [key, val]) => p.set(key, val.join(separator)), params)
: params;
}

Expand All @@ -32,7 +32,7 @@ export function stringToFormParams(object: string, separator = ','): URLFormPara
.filter(val => val && val.includes('='))
.map(val => {
const [key, values] = val.split('=');
return { key, value: values.split(separator) };
return { key: decodeURIComponent(key), value: values.split(separator).map(decodeURIComponent) };
})
.reduce((acc, val) => ({ ...acc, [val.key]: val.value }), {})
: {};
Expand Down

0 comments on commit 5f628d6

Please sign in to comment.