From 63beb458c0c136e80c9fd8a16a81f710a41258c8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sat, 1 Nov 2008 21:38:56 +0000 Subject: [PATCH] - Patch #313902 by c960657: properly display SimpleTest errors. --- misc/drupal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/drupal.js b/misc/drupal.js index 157a20fea12e..bc76189cfcc8 100644 --- a/misc/drupal.js +++ b/misc/drupal.js @@ -286,17 +286,17 @@ Drupal.getSelection = function (element) { */ Drupal.ahahError = function(xmlhttp, uri) { if (xmlhttp.status == 200) { - if (jQuery.trim($(xmlhttp.responseText).text())) { + if (jQuery.trim(xmlhttp.responseText)) { var message = Drupal.t("An error occurred. \n@uri\n@text", {'@uri': uri, '@text': xmlhttp.responseText }); } else { - var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri, '@text': xmlhttp.responseText }); + var message = Drupal.t("An error occurred. \n@uri\n(no information available).", {'@uri': uri }); } } else { var message = Drupal.t("An HTTP error @status occurred. \n@uri", {'@uri': uri, '@status': xmlhttp.status }); } - return message; + return message.replace(/\n/g, '<br />');; } // Global Killswitch on the <html> element. -- GitLab