X-Git-Url: http://gitweb.fperrin.net/?a=blobdiff_plain;f=quotes%2Flocalmodels.py;h=691ea8cc6421c13ad3c43bececf5f8e61d935e96;hb=6d29db35c714fe52854a5b2e4002403150da1954;hp=afe874a6c8c8938f2412aa3873e5fc3250240613;hpb=242b0beb0eff7c97205b0bbe3747118b70ff1ee9;p=djsite.git diff --git a/quotes/localmodels.py b/quotes/localmodels.py index afe874a..691ea8c 100644 --- a/quotes/localmodels.py +++ b/quotes/localmodels.py @@ -2,7 +2,8 @@ import tinymce.models import bleach def valid_html(value): - return bleach.clean(value, bleach.ALLOWED_TAGS + ['p']) + return bleach.clean(value, bleach.ALLOWED_TAGS + ['p', 'br'], + strip=True, strip_comments=True) class HTMLField(tinymce.models.HTMLField): def pre_save(self, model_instance, add):