X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f734261e68dc171da98aabe700e170c3ede3b6a5..93aef898ef3f9554c6ee7624113b4e7e0c62abc4:/apps/wiki/views.py?ds=sidebyside 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: