mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 04:00:02 +00:00
[mod] do not escape html content in engines
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
@parse url, title, content
|
||||
"""
|
||||
import re
|
||||
from cgi import escape
|
||||
from searx.utils import is_valid_lang
|
||||
|
||||
categories = ['general']
|
||||
@@ -52,14 +51,14 @@ def request(query, params):
|
||||
def response(resp):
|
||||
results = []
|
||||
results.append({
|
||||
'url': escape(web_url.format(
|
||||
'url': web_url.format(
|
||||
from_lang=resp.search_params['from_lang'][2],
|
||||
to_lang=resp.search_params['to_lang'][2],
|
||||
query=resp.search_params['query'])),
|
||||
'title': escape('[{0}-{1}] {2}'.format(
|
||||
query=resp.search_params['query']),
|
||||
'title': '[{0}-{1}] {2}'.format(
|
||||
resp.search_params['from_lang'][1],
|
||||
resp.search_params['to_lang'][1],
|
||||
resp.search_params['query'])),
|
||||
'content': escape(resp.json()['responseData']['translatedText'])
|
||||
resp.search_params['query']),
|
||||
'content': resp.json()['responseData']['translatedText']
|
||||
})
|
||||
return results
|
||||
|
||||
Reference in New Issue
Block a user