summaryrefslogtreecommitdiff
path: root/news/views.py
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 22:03:47 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-15 22:03:47 -0400
commit3c640cb94438dda317198843f5b498306a2bf989 (patch)
tree67ce7dc393383d5205a9e1fa56db3aa9ff18d893 /news/views.py
parent2ea4e6f4d5245dd5e43c90d54635477c6e7dd6a7 (diff)
parent1a2709552704a91f9601a13c350153b3daf3a455 (diff)
Merge tag 'release_2014-12-08' into archweb-generic
Minor fixes and package updates
Diffstat (limited to 'news/views.py')
-rw-r--r--news/views.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/news/views.py b/news/views.py
index ca4fdf97..274ba75d 100644
--- a/news/views.py
+++ b/news/views.py
@@ -1,5 +1,3 @@
-import markdown
-
from django import forms
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect
@@ -8,7 +6,7 @@ from django.views.generic import (DetailView, ListView,
CreateView, UpdateView, DeleteView)
from .models import News
-from main.utils import find_unique_slug
+from main.utils import find_unique_slug, parse_markdown
class NewsForm(forms.ModelForm):
@@ -62,7 +60,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 = parse_markdown(data)
return HttpResponse(markup)
# vim: set ts=4 sw=4 et: