Przeglądaj źródła

[fix] title escaping

asciimoo 11 lat temu
rodzic
commit
fa6f430f2e
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      searx/engines/stackoverflow.py

+ 1
- 1
searx/engines/stackoverflow.py Wyświetl plik

@@ -19,7 +19,7 @@ def response(resp):
19 19
     for result in dom.xpath('//div[@class="question-summary search-result"]'):
20 20
         link = result.xpath('.//div[@class="result-link"]//a')[0]
21 21
         href = urljoin(url, link.attrib.get('href'))
22
-        title = ' '.join(link.xpath('.//text()'))
22
+        title = escape(' '.join(link.xpath('.//text()')))
23 23
         content = escape(' '.join(result.xpath('.//div[@class="excerpt"]//text()')))
24 24
         results.append({'url': href, 'title': title, 'content': content})
25 25
     return results