From 780eef8627babee9a858d0f0f71408ff78a175c7 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Fri, 2 Mar 2012 13:39:07 +0100 Subject: [PATCH 1/1] html preview fix --- apps/catalogue/views.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/catalogue/views.py b/apps/catalogue/views.py index d234ab0c..2ee94aea 100644 --- a/apps/catalogue/views.py +++ b/apps/catalogue/views.py @@ -224,8 +224,9 @@ def book_html(request, slug): if not book.accessible(request): return HttpResponseForbidden("Not authorized.") - doc = book.wldocument() - html = doc.as_html(parse_dublincore=False, flags=['full-page']).get_string() + doc = book.wldocument(parse_dublincore=False) + html = doc.as_html(flags=['full-page']) + html = html.get_string() if html is not None else '' response = http.HttpResponse(html, content_type='text/html', mimetype='text/html') return response -- 2.20.1