# HG changeset patch # User Brian Neal # Date 1259293834 0 # Node ID d203a4a986d2c173c2534960c5090d6295cc9600 # Parent 13330e1836f33c872b9fda5a8a25113796a8a1c6 Markitup preview function wasn't working correctly due to the user data being escaped before going into the markdown and smiley filters. diff -r 13330e1836f3 -r d203a4a986d2 gpp/comments/views.py --- a/gpp/comments/views.py Fri Nov 27 03:30:15 2009 +0000 +++ b/gpp/comments/views.py Fri Nov 27 03:50:34 2009 +0000 @@ -14,6 +14,7 @@ from django.views.decorators.http import require_POST from core.functions import email_admins +from core.markup import site_markup from comments.forms import CommentForm from comments.models import Comment from comments.models import CommentFlag @@ -121,6 +122,6 @@ return HttpResponseBadRequest('No data') return render_to_response('comments/markdown_preview.html', { - 'data': data, + 'data': site_markup(data), }, context_instance = RequestContext(request)) diff -r 13330e1836f3 -r d203a4a986d2 gpp/templates/comments/markdown_preview.html --- a/gpp/templates/comments/markdown_preview.html Fri Nov 27 03:30:15 2009 +0000 +++ b/gpp/templates/comments/markdown_preview.html Fri Nov 27 03:50:34 2009 +0000 @@ -1,5 +1,3 @@ -{% load markup %} -{% load smiley_tags %} @@ -9,6 +7,6 @@ Markdown Preview -{{ data|smiley_markdown|markdown:"safe" }} +{{ data|safe }}