From ee11e6b7e1b5d5b30b09c162cabc113dafdc5e30 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 17 Nov 2023 11:28:39 +0100 Subject: [PATCH] fix quotes in project titles(more) --- pandora/item/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index ce07bc08..2172723e 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -256,6 +256,7 @@ class Item(models.Model): description = data.pop(key) if isinstance(description, dict): for value in description: + value = ox.sanitize_html(value) d, created = Description.objects.get_or_create(key=k, value=value) d.description = ox.sanitize_html(description[value]) d.save() @@ -704,7 +705,7 @@ class Item(models.Model): for d in Description.objects.filter(key=key, value__in=values): i['%sdescription' % key][d.value] = d.description else: - values = ox.sanitize_html(self.get(key, '')) + value = ox.sanitize_html(self.get(key, '')) qs = Description.objects.filter(key=key, value=value) i['%sdescription' % key] = '' if qs.count() == 0 else qs[0].description if keys: