mirror of
https://github.com/searxng/searxng.git
synced 2025-07-19 03:09:25 +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
|
@ -14,7 +14,6 @@
|
|||
"""
|
||||
|
||||
from urllib import urlencode
|
||||
from cgi import escape
|
||||
from lxml import html
|
||||
from searx.engines.xpath import extract_text
|
||||
|
||||
|
@ -61,7 +60,7 @@ def response(resp):
|
|||
link = result.xpath('.//h3/a')[0]
|
||||
url = link.attrib.get('href')
|
||||
title = extract_text(link)
|
||||
content = escape(extract_text(result.xpath('.//p')))
|
||||
content = extract_text(result.xpath('.//p'))
|
||||
|
||||
# append result
|
||||
results.append({'url': url,
|
||||
|
@ -73,7 +72,7 @@ def response(resp):
|
|||
link = result.xpath('.//h2/a')[0]
|
||||
url = link.attrib.get('href')
|
||||
title = extract_text(link)
|
||||
content = escape(extract_text(result.xpath('.//p')))
|
||||
content = extract_text(result.xpath('.//p'))
|
||||
|
||||
# append result
|
||||
results.append({'url': url,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue