|
@@ -25,6 +25,7 @@ except ImportError:
|
|
|
from ordereddict import OrderedDict # Python 2.6
|
|
from ordereddict import OrderedDict # Python 2.6
|
|
|
|
|
|
|
|
from django.http import Http404
|
|
from django.http import Http404
|
|
|
|
|
+from django.utils.html import escape
|
|
|
from django.utils.translation import ugettext as _
|
|
from django.utils.translation import ugettext as _
|
|
|
from django.views.decorators.http import require_POST
|
|
from django.views.decorators.http import require_POST
|
|
|
|
|
|
|
@@ -241,6 +242,9 @@ def search_entities_interactive(request):
|
|
|
if record.get(fname, ''):
|
|
if record.get(fname, ''):
|
|
|
record['hue_description'] += ' %s:%s' % (fname, _highlight(fval, record[fname]))
|
|
record['hue_description'] += ' %s:%s' % (fname, _highlight(fval, record[fname]))
|
|
|
|
|
|
|
|
|
|
+ record['hue_name'] = escape(record['hue_name']).replace('<em>', '<em>').replace('</em>', '</em>')
|
|
|
|
|
+ record['hue_description'] = escape(record['hue_description']).replace('<em>', '<em>').replace('</em>', '</em>')
|
|
|
|
|
+
|
|
|
response['status'] = 0
|
|
response['status'] = 0
|
|
|
|
|
|
|
|
return JsonResponse(response)
|
|
return JsonResponse(response)
|