commit: fa6f430f2ed684b1deaba08b4ffb38349254abf8
parent: 0eb3cdf66405eea67cbcdf903644090bad747d89
Author: asciimoo <asciimoo@gmail.com>
Date: Sat, 11 Jan 2014 12:39:39 +0100
[fix] title escaping
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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