X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f734261e68dc171da98aabe700e170c3ede3b6a5..465f9d370fb3b96b4cc30e139d24e4479a9f7ab0:/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: