diff --git a/server.py b/server.py
index 43fb3d233d6dbd712e35a6762029cc1be08e7181..0d1d7e2202ee656a6417da105773f969077a058d 100755
--- a/server.py
+++ b/server.py
@@ -532,7 +532,9 @@ def show_protocol(protocol):
     content_html = (protocol.content_html_private
         if protocol.has_private_view_right(user)
         else protocol.content_html_public)
-    return render_template("protocol-show.html", protocol=protocol, errors_table=errors_table, documents_table=documents_table, document_upload_form=document_upload_form, source_upload_form=source_upload_form, time_diff=time_diff, large_time_diff=large_time_diff, content_html=Markup(content_html))
+    if content_html is not None:
+        content_html = Markup(content_html)
+    return render_template("protocol-show.html", protocol=protocol, errors_table=errors_table, documents_table=documents_table, document_upload_form=document_upload_form, source_upload_form=source_upload_form, time_diff=time_diff, large_time_diff=large_time_diff, content_html=content_html)
 
 @app.route("/protocol/delete/<int:protocol_id>")
 @login_required