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(); // 去掉空值和空格 });