summaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-10-31 00:21:45 -0500
committerDan McGee <dan@archlinux.org>2012-10-31 00:34:44 -0500
commitce5b0b2c5c10a3c840fd8aaa696ec2b8f403dc5b (patch)
tree7b0b3e631ec6b80531a6d49dfa9f62d2495facf2 /news
parente2f7f3c9ea90d66c5d9678bd4b182917b03a2a90 (diff)
Disable markdown safe mode
Unless we want older news items to look like [HTML_REMOVED]this[HTML_REMOVED] all over the place. I'm tempted to mark old items as non-safe but enforce safe mode for all new news postings. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'news')
-rw-r--r--news/models.py2
-rw-r--r--news/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/news/models.py b/news/models.py
index 40238cde..55d36318 100644
--- a/news/models.py
+++ b/news/models.py
@@ -22,7 +22,7 @@ class News(models.Model):
def html(self):
return mark_safe(markdown.markdown(
- self.content, safe_mode=True, enable_attributes=False))
+ self.content, safe_mode=False, enable_attributes=False))
def __unicode__(self):
return self.title
diff --git a/news/views.py b/news/views.py
index 74bec058..52182800 100644
--- a/news/views.py
+++ b/news/views.py
@@ -76,7 +76,7 @@ def view_redirect(request, object_id):
@require_POST
def preview(request):
data = request.POST.get('data', '')
- markup = markdown.markdown(data, safe_mode=True, enable_attributes=False)
+ markup = markdown.markdown(data, safe_mode=False, enable_attributes=False)
return HttpResponse(markup)
# vim: set ts=4 sw=4 et: