From 85f2bac6fd5df0f4c4b8ffdde351d18acffd14a7 Mon Sep 17 00:00:00 2001 From: James Turk Date: Tue, 28 Sep 2010 10:39:45 -0400 Subject: [PATCH] use new escape_html option --- README.rst | 2 +- example/example | Bin 43008 -> 0 bytes markupwiki/models.py | 3 ++- markupwiki/views.py | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) delete mode 100644 example/example diff --git a/README.rst b/README.rst index 36ea746..ef831f0 100644 --- a/README.rst +++ b/README.rst @@ -13,7 +13,7 @@ might not be for you. 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. diff --git a/example/example b/example/example deleted file mode 100644 index 51ee816c73618148b4a23dfc8ed2f7ad59060eb5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43008 zcmeHQYfK!+9iQ3RyM;4vI2Je)mcwASn3w}&gDuM;=HfUuIDR12mYUO=Ta$C(j@%u7 zsSh2fQKd#z6{S+uen|VJm70F2`k{5yHdWGo>H8(Mk=lM})GCo$MXFR)l~YxnnVsF8 z-P;3<@dKCzhI#yF{{Q*SV|V}moBy3Zdpc7zwJW*&f>G2)fD9l6PiPtd;28enuQr^3 zTm~QKvdg0(oE1jzl7c?;A^JD^C;A6^&&nvL7CHAHfzqdtq9zh>MK2nc=gkEp|H9JZ z^~?*Il#wrHW`lC%7dwRm}zxYi%h@Dq73 zLODZLoHx^%yg6G;6?1$m5xq1C6;;>a@^Okl`l^wg%cTltp^(XCy(!7tb8n&3YgRS& zf_c;J)B&zf0T9@A(nisUYen-$(T{+6V-d@r!UPy95*9NHrb86bk4Rzlj1EC2n>KG0 zUYy5kIb|#rb2OczqT<=q6~loV#X)le4r*#}poDP{MzuJE=(7O-ic26M5O{b96renH zeZnxuM#qQ74_rwbBbUd_@q{sQ@IZQWI59SqJ~(Wca}&>u&z?;#UAizea%plVF?C^j z{>f@|$2klg?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8(he^2m<$^wBcjeuDHTYC6}@B)E* GLg4>`VE5<% diff --git a/markupwiki/models.py b/markupwiki/models.py index 98e71b7..f6bd195 100644 --- a/markupwiki/models.py +++ b/markupwiki/models.py @@ -77,7 +77,8 @@ class ArticleVersion(models.Model): author = models.ForeignKey(User, related_name='article_versions') number = models.PositiveIntegerField() 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) timestamp = models.DateTimeField(auto_now_add=True) diff --git a/markupwiki/views.py b/markupwiki/views.py index c1d533c..a5ca08f 100644 --- a/markupwiki/views.py +++ b/markupwiki/views.py @@ -11,7 +11,8 @@ from django.utils.functional import wraps from markupwiki.models import Article, PUBLIC, DELETED, LOCKED 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 new_view(request, title, *args, **kwargs):