mirror of
https://github.com/searxng/searxng.git
synced 2025-07-15 01:09:21 +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, suggestion
|
||||
|
||||
import re
|
||||
from cgi import escape
|
||||
from urllib import urlencode
|
||||
from urlparse import urlparse, parse_qsl
|
||||
from lxml import html, etree
|
||||
|
@ -155,7 +154,7 @@ def parse_url(url_string, google_hostname):
|
|||
def extract_text_from_dom(result, xpath):
|
||||
r = result.xpath(xpath)
|
||||
if len(r) > 0:
|
||||
return escape(extract_text(r[0]))
|
||||
return extract_text(r[0])
|
||||
return None
|
||||
|
||||
|
||||
|
@ -264,7 +263,7 @@ def response(resp):
|
|||
# parse suggestion
|
||||
for suggestion in dom.xpath(suggestion_xpath):
|
||||
# append suggestion
|
||||
results.append({'suggestion': escape(extract_text(suggestion))})
|
||||
results.append({'suggestion': extract_text(suggestion)})
|
||||
|
||||
# return results
|
||||
return results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue