comparison comments/models.py @ 963:4619290d171d

Whitelist hot-linked image sources.
author Brian Neal <bgneal@gmail.com>
date Tue, 01 Sep 2015 20:33:40 -0500
parents 66d46d31d543
children 5ba2508939f7
comparison
equal deleted inserted replaced
962:10e7570a3aab 963:4619290d171d
55 55
56 def save(self, *args, **kwargs): 56 def save(self, *args, **kwargs):
57 if not self.id: 57 if not self.id:
58 self.creation_date = datetime.datetime.now() 58 self.creation_date = datetime.datetime.now()
59 59
60 self.html = site_markup(self.comment) 60 self.html = kwargs.pop('html', None)
61 if self.html is None:
62 self.html = site_markup(self.comment)
61 super(Comment, self).save(*args, **kwargs) 63 super(Comment, self).save(*args, **kwargs)
62 64
63 def get_absolute_url(self): 65 def get_absolute_url(self):
64 return self.get_content_object_url() + ('#c%s' % self.id) 66 return self.get_content_object_url() + ('#c%s' % self.id)
65 67