From f13a02c6e3e3ec8f5a2665094c1c5020b2730036 Mon Sep 17 00:00:00 2001 From: luxtiasco <79135227+luxtiasco@users.noreply.github.com> Date: Wed, 22 Feb 2023 04:32:24 +0800 Subject: [PATCH] Update webapp.py --- searx/webapp.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/searx/webapp.py b/searx/webapp.py index c7e71ad44..c42d9a779 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -984,7 +984,13 @@ function replaceUrlWithFootnote(text) { } function beautify(text) { - new_text = replaceUrlWithFootnote(text.replaceAll("(","(").replaceAll(")",")")) +new_text=text +for(let i=prompt.url_pair.length;i>=0;--i) +{ + new_text = new_text.replaceAll("(url"+String(i),"(https://url"+String(i) ) + new_text = new_text.replaceAll("(链接"+String(i),"(https://url"+String(i) ) +} + new_text = replaceUrlWithFootnote(new_text.replaceAll("(","(").replaceAll(")",")")) for(let i=prompt.url_pair.length;i>=0;--i) {