summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2014-01-11 12:39:39 +0100
committerasciimoo <asciimoo@gmail.com>2014-01-11 12:39:39 +0100
commitfa6f430f2ed684b1deaba08b4ffb38349254abf8 (patch)
treee849e3522f304dedfe4566a7b604f380f94b2c64 /searx
parent0eb3cdf66405eea67cbcdf903644090bad747d89 (diff)
[fix] title escaping
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/stackoverflow.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py
index ee1a72734..9ee89bc6e 100644
--- a/searx/engines/stackoverflow.py
+++ b/searx/engines/stackoverflow.py
@@ -19,7 +19,7 @@ def response(resp):
for result in dom.xpath('//div[@class="question-summary search-result"]'):
link = result.xpath('.//div[@class="result-link"]//a')[0]
href = urljoin(url, link.attrib.get('href'))
- title = ' '.join(link.xpath('.//text()'))
+ title = escape(' '.join(link.xpath('.//text()')))
content = escape(' '.join(result.xpath('.//div[@class="excerpt"]//text()')))
results.append({'url': href, 'title': title, 'content': content})
return results