use new escape_html option

This commit is contained in:
James Turk 2010-09-28 10:39:45 -04:00
parent 2e04c8be6b
commit 85f2bac6fd
4 changed files with 5 additions and 3 deletions

View File

@ -13,7 +13,7 @@ might not be for you.
Requirements Requirements
============ ============
django-markupwiki depends on django >= 1.2a, django-markupfield >= 1.0.0a2 and django-markupwiki depends on django >= 1.2, django-markupfield >= 1.0.0b and
libraries for whichever markup options you wish to include. libraries for whichever markup options you wish to include.

Binary file not shown.

View File

@ -77,7 +77,8 @@ class ArticleVersion(models.Model):
author = models.ForeignKey(User, related_name='article_versions') author = models.ForeignKey(User, related_name='article_versions')
number = models.PositiveIntegerField() number = models.PositiveIntegerField()
body = MarkupField(default_markup_type=DEFAULT_MARKUP_TYPE, body = MarkupField(default_markup_type=DEFAULT_MARKUP_TYPE,
markup_choices=WIKI_MARKUP_TYPES) markup_choices=WIKI_MARKUP_TYPES,
escape_html=True)
comment = models.CharField(max_length=200, blank=True) comment = models.CharField(max_length=200, blank=True)
timestamp = models.DateTimeField(auto_now_add=True) timestamp = models.DateTimeField(auto_now_add=True)

View File

@ -11,7 +11,8 @@ from django.utils.functional import wraps
from markupwiki.models import Article, PUBLIC, DELETED, LOCKED from markupwiki.models import Article, PUBLIC, DELETED, LOCKED
from markupwiki.forms import ArticleForm, StaffModerationForm, ArticleRenameForm from markupwiki.forms import ArticleForm, StaffModerationForm, ArticleRenameForm
CREATE_MISSING_ARTICLE = getattr(settings, 'MARKUPWIKI_CREATE_MISSING_ARTICLES', True) CREATE_MISSING_ARTICLE = getattr(settings,
'MARKUPWIKI_CREATE_MISSING_ARTICLES', True)
def title_check(view): def title_check(view):
def new_view(request, title, *args, **kwargs): def new_view(request, title, *args, **kwargs):