diff --git a/ajax.php b/ajax.php
index 2f6f5673..6dfd49f0 100644
--- a/ajax.php
+++ b/ajax.php
@@ -214,7 +214,7 @@ class ajax_common
function ajax_die($error_msg, $error_code = E_AJAX_GENERAL_ERROR)
{
$this->response['error_code'] = $error_code;
- $this->response['error_msg'] = $error_msg;
+ $this->response['error_msg'] = strip_tags(preg_replace('#
#i', "\n", $error_msg));
$this->send();
}
@@ -315,7 +315,7 @@ class ajax_common
if (empty($confirm_msg)) $this->ajax_die('false');
$this->response['prompt_confirm'] = 1;
- $this->response['confirm_msg'] = $confirm_msg;
+ $this->response['confirm_msg'] = strip_tags(preg_replace('#
#i', "\n", $confirm_msg));
$this->send();
}
diff --git a/library/includes/functions.php b/library/includes/functions.php
index 30887f6e..8cadfddc 100644
--- a/library/includes/functions.php
+++ b/library/includes/functions.php
@@ -1805,7 +1805,7 @@ function bb_die ($msg_text)
if (defined('IN_AJAX'))
{
- $ajax->ajax_die(strip_tags(preg_replace('#
#i', "\n", $msg_text)));
+ $ajax->ajax_die($msg_text);
}
// Check