mirror of
https://github.com/searxng/searxng.git
synced 2025-07-22 12:49:22 +02:00
[mod] do not escape html content in engines
This commit is contained in:
parent
28f12ef5a0
commit
16bdc0baf4
30 changed files with 56 additions and 97 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue