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
@@ -7,7 +7,7 @@ import { Plugin } from '@typings/plugin';
class NovelFire implements Plugin.PluginBase {
id = 'novelfire';
name = 'Novel Fire';
version = '1.0.1';
version = '1.0.2';
icon = 'src/en/novelfire/icon.png';
site = 'https://novelfire.net/';
@@ -230,7 +230,7 @@ class NovelFire implements Plugin.PluginBase {
searchTerm: string,
page: number,
): Promise<Plugin.NovelItem[]> {
const url = `${this.site}search?keyword=${searchTerm}&page=${page}`;
const url = `${this.site}search?keyword=${encodeURIComponent(searchTerm)}&page=${page}`;
const result = await fetchApi(url);
const body = await result.text();