mirror of
https://github.com/sct/overseerr.git
synced 2025-10-02 16:43:16 +02:00
fix(frontend): allow more special characters in search input
fixes #430
This commit is contained in:
@@ -7,8 +7,20 @@ import type { Nullable } from '../utils/typeHelpers';
|
||||
|
||||
type Url = string | UrlObject;
|
||||
|
||||
const extraEncodes: [RegExp, string][] = [
|
||||
[/\(/g, '%28'],
|
||||
[/\)/g, '%29'],
|
||||
[/!/g, '%21'],
|
||||
];
|
||||
|
||||
const encodeURIExtraParams = (string: string): string => {
|
||||
return encodeURIComponent(string).replace(/!/g, '%21');
|
||||
let finalString = encodeURIComponent(string);
|
||||
|
||||
extraEncodes.forEach((encode) => {
|
||||
finalString = finalString.replace(encode[0], encode[1]);
|
||||
});
|
||||
|
||||
return finalString;
|
||||
};
|
||||
|
||||
interface SearchObject {
|
||||
|
Reference in New Issue
Block a user