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