diff --git a/pandora/annotation/views.py b/pandora/annotation/views.py index 01896777..6244411e 100644 --- a/pandora/annotation/views.py +++ b/pandora/annotation/views.py @@ -4,6 +4,7 @@ from __future__ import division from django.conf import settings +import ox from ox.utils import json from ox.django.decorators import login_required_json from ox.django.shortcuts import render_to_json_response, get_object_or_404_json, json_response, HttpErrorJson @@ -168,7 +169,7 @@ def addAnnotation(request, data): if layer['canAddAnnotations'].get(request.user.get_profile().get_level()): if layer['type'] == 'entity': try: - value = Entity.get_by_name(data['value'], layer['entity']).get_id() + value = Entity.get_by_name(ox.decode_html(data['value']), layer['entity']).get_id() except Entity.DoesNotExist: response = json_response({}) response['status']['text'] = 'unkown entity' @@ -281,7 +282,7 @@ def editAnnotation(request, data): if key in data: if key == 'value' and layer['type'] == 'entity': try: - value = Entity.get_by_name(data['value'], layer['entity']).get_id() + value = Entity.get_by_name(ox.decode_html(data['value']), layer['entity']).get_id() except Entity.DoesNotExist: response = json_response({}) response['status']['text'] = 'unkown entity'