Index: misc/drupal.js
===================================================================
RCS file: /cvs/drupal/drupal/misc/drupal.js,v
retrieving revision 1.46
diff -u -9 -p -r1.46 drupal.js
--- misc/drupal.js	12 Oct 2008 00:29:09 -0000	1.46
+++ misc/drupal.js	19 Oct 2008 20:39:39 -0000
@@ -244,29 +244,29 @@ Drupal.getSelection = function (element)
   }
   return { 'start': element.selectionStart, 'end': element.selectionEnd };
 };
 
 /**
  * Build an error message from ahah response.
  */
 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.
 if (Drupal.jsEnabled) {
   // Global Killswitch on the <html> element.
   $(document.documentElement).addClass('js');
   // 'js enabled' cookie.
   document.cookie = 'has_js=1; path=/';
   // Attach all behaviors.
