forked from 0x2620/pandora
fix quotes in project titles
This commit is contained in:
parent
4fed1112a6
commit
b82440df24
1 changed files with 4 additions and 2 deletions
|
@ -260,7 +260,7 @@ class Item(models.Model):
|
||||||
d.description = ox.sanitize_html(description[value])
|
d.description = ox.sanitize_html(description[value])
|
||||||
d.save()
|
d.save()
|
||||||
else:
|
else:
|
||||||
value = ox.escape_html(data.get(k, self.get(k, '')))
|
value = ox.sanitize_html(data.get(k, self.get(k, '')))
|
||||||
if not description:
|
if not description:
|
||||||
description = ''
|
description = ''
|
||||||
d, created = Description.objects.get_or_create(key=k, value=value)
|
d, created = Description.objects.get_or_create(key=k, value=value)
|
||||||
|
@ -700,10 +700,12 @@ class Item(models.Model):
|
||||||
else:
|
else:
|
||||||
values = self.get(key)
|
values = self.get(key)
|
||||||
if values:
|
if values:
|
||||||
|
values = [ox.sanitize_html(value) for value in values]
|
||||||
for d in Description.objects.filter(key=key, value__in=values):
|
for d in Description.objects.filter(key=key, value__in=values):
|
||||||
i['%sdescription' % key][d.value] = d.description
|
i['%sdescription' % key][d.value] = d.description
|
||||||
else:
|
else:
|
||||||
qs = Description.objects.filter(key=key, value=self.get(key, ''))
|
values = 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
|
i['%sdescription' % key] = '' if qs.count() == 0 else qs[0].description
|
||||||
if keys:
|
if keys:
|
||||||
info = {}
|
info = {}
|
||||||
|
|
Loading…
Reference in a new issue