From 55206ea092fb7f066031143366c2eebeb209c480 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 29 Aug 2023 12:29:18 +0800 Subject: [PATCH] =?UTF-8?q?fix=20#299=20=E6=90=9C=E7=B4=A2=E6=97=B6?= =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=89=B9=E6=AE=8A=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/modules/indexer/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/modules/indexer/__init__.py b/app/modules/indexer/__init__.py index 7cd677b5..60562b49 100644 --- a/app/modules/indexer/__init__.py +++ b/app/modules/indexer/__init__.py @@ -53,6 +53,10 @@ class IndexerModule(_ModuleBase): logger.warn(f"{site.get('name')} 不支持中文搜索") return [] + # 去除搜索关键字中的特殊字符 + if search_word: + search_word = StringUtils.clear(search_word, replace_word=" ", allow_space=True) + # 开始索引 result_array = [] # 开始计时