mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
fix(search): Handle search errors and escape * (#893)
This commit is contained in:
@@ -11,6 +11,7 @@ import { LanguageContext } from '../../context/LanguageContext';
|
|||||||
import { defineMessages, useIntl } from 'react-intl';
|
import { defineMessages, useIntl } from 'react-intl';
|
||||||
import Header from '../Common/Header';
|
import Header from '../Common/Header';
|
||||||
import PageTitle from '../Common/PageTitle';
|
import PageTitle from '../Common/PageTitle';
|
||||||
|
import Error from '../../pages/_error';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
search: 'Search',
|
search: 'Search',
|
||||||
@@ -53,7 +54,7 @@ const Search: React.FC = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <div>{error}</div>;
|
return <Error statusCode={error.code} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const titles = data?.reduce(
|
const titles = data?.reduce(
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const extraEncodes: [RegExp, string][] = [
|
|||||||
[/\(/g, '%28'],
|
[/\(/g, '%28'],
|
||||||
[/\)/g, '%29'],
|
[/\)/g, '%29'],
|
||||||
[/!/g, '%21'],
|
[/!/g, '%21'],
|
||||||
|
[/\*/g, '%2A'],
|
||||||
];
|
];
|
||||||
|
|
||||||
const encodeURIExtraParams = (string: string): string => {
|
const encodeURIExtraParams = (string: string): string => {
|
||||||
|
|||||||
Reference in New Issue
Block a user