From fa6f430f2ed684b1deaba08b4ffb38349254abf8 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Sat, 11 Jan 2014 12:39:39 +0100 Subject: [PATCH] [fix] title escaping --- searx/engines/stackoverflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/searx/engines/stackoverflow.py b/searx/engines/stackoverflow.py index ee1a7273..9ee89bc6 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