From 49697192319f32ecf0caa6a73842a56331094b11 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Fri, 9 Mar 2012 23:47:36 +0100 Subject: [PATCH] newlines --- pandora/annotation/models.py | 2 +- pandora/annotation/tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/annotation/models.py b/pandora/annotation/models.py index c49bf9d1..6678e239 100644 --- a/pandora/annotation/models.py +++ b/pandora/annotation/models.py @@ -130,7 +130,7 @@ class Annotation(models.Model): layer = self.get_layer() if self.value: self.value = utils.cleanup_value(self.value, layer['type']) - self.findvalue = ox.decodeHtml(ox.stripTags(self.value).strip()) + self.findvalue = ox.decodeHtml(ox.stripTags(self.value).strip()).replace('\n ', ' ') sortvalue = sort_string(self.findvalue) if sortvalue: self.sortvalue = sortvalue[:900] diff --git a/pandora/annotation/tasks.py b/pandora/annotation/tasks.py index bd8e6c70..d828d5ac 100644 --- a/pandora/annotation/tasks.py +++ b/pandora/annotation/tasks.py @@ -27,7 +27,7 @@ def update_matching_events(id): for n in Event.objects.all().values('id', 'name', 'alternativeNames'): names[n['id']] = [ox.decodeHtml(n) for n in [n['name']] + json.loads(n['alternativeNames'])] - value = a.findvalue.lower() + value = a.findvalue.lower().replace('\n', ' ') update = [] for i in names: for name in names[i]: