old_contents: # coding=utf-8
  from django.db import models
  
  from utils.xss_filter import XssHtml
  
  
  class RichTextField(models.TextField):
      __metaclass__ = models.SubfieldBase
  
      def get_prep_value(self, value):
          parser = XssHtml()
          parser.feed(value)
          parser.close()
          return parser.getHtml()
new_contents: # coding=utf-8
  from django.db import models
  
  from utils.xss_filter import XssHtml
  
  
  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()
          return parser.getHtml()
subject: 修复 None 导致的 xss filter 错误