diff --git a/misc/drupal.js b/misc/drupal.js index 157a20fea12ee8b35ee9770e276892eba20bd32b..bc76189cfcc8bef9288763d8aaa63b01fcf85bd1 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, '
');; } // Global Killswitch on the element.