Fix special characters breaking search in most sources (#1557)

This commit is contained in:
Adam Kemish
2025-03-15 15:35:31 +08:00
committed by GitHub
parent 3a10e24545
commit ea7965bdda
28 changed files with 103 additions and 73 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import { Filters, FilterTypes } from '@libs/filterInputs';
class PawRead implements Plugin.PluginBase {
id = 'pawread';
name = 'PawRead';
version = '2.0.0';
version = '2.0.1';
icon = 'src/en/pawread/icon.png';
site = 'https://m.pawread.com/';
@@ -128,7 +128,7 @@ class PawRead implements Plugin.PluginBase {
searchTerm: string,
page: number,
): Promise<Plugin.NovelItem[]> {
const searchUrl = `${this.site}search/?keywords=${searchTerm}&page=${page}`;
const searchUrl = `${this.site}search/?keywords=${encodeURIComponent(searchTerm)}&page=${page}`;
const result = await fetchApi(searchUrl);
const body = await result.text();