escape titles

This commit is contained in:
j 2013-07-22 22:36:47 +02:00
parent 55b26bdb19
commit 000d913da1

View file

@ -175,9 +175,11 @@ class Imdb(models.Model):
data['links'] = self.links()
data['posters'] = self.posters(request)
if 'title' in data:
data['title'] = ox.sanitize_html(data['title'])
data['title'] = ox.escape_html(data['title'])
if 'originalTitle' in data:
data['originalTitle'] = ox.escape_html(data['originalTitle'])
if 'alternativeTitles' in data:
data['alternativeTitles'] = [(ox.sanitize_html(a[0]), a[1]) for a in data['alternativeTitles']]
data['alternativeTitles'] = [(ox.escape_html(a[0]), a[1]) for a in data['alternativeTitles']]
if 'connections' in data:
for type in data['connections']:
for c in data['connections'][type]: