X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f734261e68dc171da98aabe700e170c3ede3b6a5..f9f061cab006c95dec8e972ce3989a0215756a81:/apps/wiki/views.py diff --git a/apps/wiki/views.py b/apps/wiki/views.py index b242802b..9a156a4c 100644 --- a/apps/wiki/views.py +++ b/apps/wiki/views.py @@ -23,7 +23,7 @@ def document_detail(request, name, template_name='wiki/document_details.html'): form = DocumentForm(request.POST, instance=document) if form.is_valid(): document = form.save() - return HttpResponse(json.dumps({'text': document.text, 'revision': document.revision()})) + return HttpResponse(json.dumps({'text': document.plain_text(), 'meta': document.meta(), 'revision': document.revision()})) else: return HttpResponse(json.dumps({'errors': form.errors})) else: