summaryrefslogtreecommitdiff
path: root/news/views.py
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-04-16 01:16:52 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-04-16 01:16:52 -0400
commit7aabbe788bb4e26ee9c7cfc0e18692b487e11099 (patch)
treee1032beb86e35caafb164e694d2aa7e2e9664de2 /news/views.py
parent046e6c8b6152a8142ed838e5c406cc04c18f2533 (diff)
parent155bf43a28e404f327a7bcff214c22e212627673 (diff)
Merge branch 'archweb-generic'
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: