on master help sign in
[fix] html tag removal
commit59eeeaab87951fd6fa3302ec240db98902a20b2c authorasciimoo <asciimoo@gmail.com> dateThu 23 Jan 2014, 11:08 (13 years ago) parentba0f818
1 file changed+2−1
searx/engines/xpath.py+2−1
searx/engines/xpath.py+2−1
@@ -2,6 +2,7 @@ from lxml import html
22from urllib import urlencode, unquote
33from urlparse import urlparse, urljoin
44from lxml.etree import _ElementStringResult
5+from searx.utils import html_to_text
56
67search_url = None
78url_xpath = None
@@ -33,7 +34,7 @@ def extract_text(xpath_results):
3334 return ''.join(xpath_results)
3435 else:
3536 # it's a element
36− return xpath_results.text_content()
37+ return html_to_text(xpath_results.text_content())
3738
3839
3940def extract_url(xpath_results):