fix quotes in project titles(more)
This commit is contained in:
parent
b82440df24
commit
ee11e6b7e1
1 changed files with 2 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue