From 60327d96a687669d8b8842ecf0ac16c11a8f6483 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 8 Dec 2014 19:52:55 -0600 Subject: Upgrade to python-markdown 2.5.2 safe_mode is now deprecated, so adjust things accordingly. Signed-off-by: Dan McGee --- news/views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'news/views.py') 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 @@ 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: -- cgit v1.2.3-54-g00ecf