Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] title escaping

asciimoofa6f430f2ed6
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