修复None 导致的 xss filter 工作异常

This commit is contained in:
virusdefender 2015-09-23 21:30:00 +08:00
parent e131c7e9f9
commit aa4ed9b9b2

View File

@ -8,6 +8,8 @@ class RichTextField(models.TextField):
__metaclass__ = models.SubfieldBase
def get_prep_value(self, value):
if not value:
return value
parser = XssHtml()
parser.feed(value)
parser.close()