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 { defaultCover } from '@libs/defaultCover';
class NovelHall implements Plugin.PluginBase {
id = 'novelhall';
name = 'Novel Hall';
version = '1.0.1';
version = '1.0.2';
icon = 'src/en/novelhall/icon.png';
site = 'https://novelhall.com/';
@@ -90,7 +90,7 @@ class NovelHall implements Plugin.PluginBase {
}
async searchNovels(searchTerm: string): Promise<Plugin.NovelItem[]> {
const url = `${this.site}index.php?s=so&module=book&keyword=${searchTerm}`;
const url = `${this.site}index.php?s=so&module=book&keyword=${encodeURIComponent(searchTerm)}`;
const body = await fetchApi(url).then(r => r.text());
const loadedCheerio = parseHTML(body);