|
|
@@ -836,7 +836,7 @@ def augment_solr_response(response, collection, query):
|
|
|
escaped_highlighting = {}
|
|
|
for field, hls in highlighting.iteritems():
|
|
|
_hls = [escape(smart_unicode(hl, errors='replace')).replace('<em>', '<em>').replace('</em>', '</em>') for hl in hls]
|
|
|
- escaped_highlighting[field] = _hls
|
|
|
+ escaped_highlighting[field] = _hls[0] if len(_hls) == 1 else _hls
|
|
|
|
|
|
doc.update(escaped_highlighting)
|
|
|
else:
|