From ad3438b859dd82ec81600826e4da7ed2006f0317 Mon Sep 17 00:00:00 2001 From: Michael Price Date: Sat, 10 Mar 2018 14:08:58 -0400 Subject: [PATCH] Don't remove newlines on error message pages. Signed-off-by: Michael Price --- .../apps/appearance/static/appearance/js/partial_navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mayan/apps/appearance/static/appearance/js/partial_navigation.js b/mayan/apps/appearance/static/appearance/js/partial_navigation.js index 6cdc6a3958..5a251254fa 100644 --- a/mayan/apps/appearance/static/appearance/js/partial_navigation.js +++ b/mayan/apps/appearance/static/appearance/js/partial_navigation.js @@ -127,11 +127,12 @@ PartialNavigation.prototype.processAjaxRequestError = function (jqXHR) { * Method to process an AJAX request and make it presentable to the * user. */ + if (jqXHR.status == 0) { $('#modal-server-error .modal-body').html($('#template-error').html()); $('#modal-server-error').modal('show') } else { - $('#ajax-content').html(jqXHR.responseText.replace(/\n/g, "
")); + $('#ajax-content').html(jqXHR.responseText); } }