Mercurial > public > sg101
diff forums/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 | 2e429e2b7bb6 |
children | 5ba2508939f7 |
line wrap: on
line diff
--- a/forums/models.py Tue Aug 04 16:58:17 2015 -0500 +++ b/forums/models.py Tue Sep 01 20:33:40 2015 -0500 @@ -311,7 +311,9 @@ self.creation_date = datetime.datetime.now() self.update_date = self.creation_date - self.html = site_markup(self.body) + self.html = kwargs.pop('html', None) + if self.html is None: + self.html = site_markup(self.body) super(Post, self).save(*args, **kwargs) def delete(self, *args, **kwargs):