summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--misc/drupal.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/drupal.js b/misc/drupal.js
index 157a20fea..bc76189cf 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.