Mercurial > public > sg101
diff 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 |
line wrap: on
line diff
--- a/comments/models.py Tue Aug 04 16:58:17 2015 -0500 +++ b/comments/models.py Tue Sep 01 20:33:40 2015 -0500 @@ -57,7 +57,9 @@ if not self.id: self.creation_date = datetime.datetime.now() - self.html = site_markup(self.comment) + self.html = kwargs.pop('html', None) + if self.html is None: + self.html = site_markup(self.comment) super(Comment, self).save(*args, **kwargs) def get_absolute_url(self):