增加富文本的 xss 过滤

This commit is contained in:
virusdefender
2015-09-22 17:03:53 +08:00
parent b224a823fe
commit c26fd6734d
8 changed files with 288 additions and 3 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import utils.models
class Migration(migrations.Migration):
dependencies = [
('problem', '0007_remove_problem_last_update_time'),
]
operations = [
migrations.AlterField(
model_name='problem',
name='description',
field=utils.models.RichTextField(),
),
]

View File

@@ -2,6 +2,7 @@
from django.db import models
from account.models import User
from utils.models import RichTextField
class ProblemTag(models.Model):
@@ -15,7 +16,7 @@ class AbstractProblem(models.Model):
# 标题
title = models.CharField(max_length=50)
# 问题描述 HTML 格式
description = models.TextField()
description = RichTextField()
# 输入描述
input_description = models.CharField(max_length=10000)
# 输出描述