mirror of
https://github.com/QingdaoU/OnlineJudge.git
synced 2025-11-04 14:49:58 +08:00
修复None 导致的 xss filter 工作异常
This commit is contained in:
parent
e131c7e9f9
commit
aa4ed9b9b2
@ -8,6 +8,8 @@ class RichTextField(models.TextField):
|
|||||||
__metaclass__ = models.SubfieldBase
|
__metaclass__ = models.SubfieldBase
|
||||||
|
|
||||||
def get_prep_value(self, value):
|
def get_prep_value(self, value):
|
||||||
|
if not value:
|
||||||
|
return value
|
||||||
parser = XssHtml()
|
parser = XssHtml()
|
||||||
parser.feed(value)
|
parser.feed(value)
|
||||||
parser.close()
|
parser.close()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user