From 8f16390022b75e7a7b3886b8b719441c7ddc19de Mon Sep 17 00:00:00 2001 From: Joseph Cheung Date: Wed, 1 Mar 2023 22:18:15 +0800 Subject: [PATCH] d --- searx/webapp.py | 1044 +--------------------------------------------- searx/webapp1.py | 5 + 2 files changed, 6 insertions(+), 1043 deletions(-) diff --git a/searx/webapp.py b/searx/webapp.py index 6baa4ae45..774f0f3bb 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -1182,1049 +1182,7 @@ const search_type = "''' + search_type + r'''" const net_search = ''' + net_search_str + r''' diff --git a/searx/webapp1.py b/searx/webapp1.py index 6baa4ae45..a1f081557 100644 --- a/searx/webapp1.py +++ b/searx/webapp1.py @@ -1291,6 +1291,11 @@ function modal_open(url, num) fulltext = fulltext.replaceAll("\n\n","\n").replaceAll("\n\n","\n"); const delimiter = /[?!;\?\n。;!………]/g fulltext = fulltext.split(delimiter); + fulltext = fulltext.filter((item) => { + // 使用正则表达式匹配仅由数字、逗号和空格组成的字符串 + const regex = /^[0-9,\s]+$/; + return !regex.test(item); + }); fulltext = fulltext.filter(function(item) { return item && item.trim(); // 去掉空值和空格 });