diff --git a/panel/classes/Panel/Vmail/Autoresponders.php b/panel/classes/Panel/Vmail/Autoresponders.php index 536d484..1396330 100644 --- a/panel/classes/Panel/Vmail/Autoresponders.php +++ b/panel/classes/Panel/Vmail/Autoresponders.php @@ -66,13 +66,7 @@ class Autoresponders extends \Panel\Vmail { $subject = substr_replace($subject, "", -1); $autoresponder_array['subject'] = $subject; - $body = $autoresponder_array['body']; - $body = str_replace('\n', '
', $body); - $body = str_replace("\\'", "'", $body); - $body = stripslashes($body); - $body = substr_replace($body, "", 0, 1); - $body = substr_replace($body, "", -1); - $autoresponder_array['body'] = $body; + $autoresponder_array['body'] = base64_decode($autoresponder_array['body']);; $autoresponders_array[$k] = $autoresponder_array; diff --git a/panel/classes/Panel/Vmail/AutorespondersAdd.php b/panel/classes/Panel/Vmail/AutorespondersAdd.php index cae5fb0..33d3d64 100644 --- a/panel/classes/Panel/Vmail/AutorespondersAdd.php +++ b/panel/classes/Panel/Vmail/AutorespondersAdd.php @@ -45,11 +45,7 @@ class AutorespondersAdd extends \Panel\Vmail { $mbox = $f3->get('PARAMS.mbox'); $domain = $f3->get('PARAMS.domain'); $subject = addslashes($subject); - $body = addslashes($body); - $body = str_replace('\"', '\\\\\"', $body); - $body = str_replace("\r\n", '\n', $body); - $body = str_replace("\r", '\n', $body); - $body = str_replace("\n", '\n', $body); + $body = base64_encode($body); exec("/usr/local/bin/vmail-autoresponders-add.sh -e $mbox@$domain -u \"$subject\" -b \"$body\" -o \"$mode\" -s \"$status\"", $output, $result_code); if ($result_code == 0) { $messages[] = "Success: Autoresponder for email account $mbox@$domain added."; diff --git a/panel/classes/Panel/Vmail/AutorespondersEdit.php b/panel/classes/Panel/Vmail/AutorespondersEdit.php index 9de0358..97d14e7 100644 --- a/panel/classes/Panel/Vmail/AutorespondersEdit.php +++ b/panel/classes/Panel/Vmail/AutorespondersEdit.php @@ -26,13 +26,7 @@ class AutorespondersEdit extends \Panel\Vmail { $subject = substr_replace($subject, "", -1); $autoresponder_array[0]['subject'] = $subject; - $body = $autoresponder_array[0]['body']; - $body = str_replace('\n', "\n", $body); - $body = str_replace("\\'", "'", $body); - $body = stripslashes($body); - $body = substr_replace($body, "", 0, 1); - $body = substr_replace($body, "", -1); - $autoresponder_array[0]['body'] = $body; + $autoresponder_array[0]['body'] = base64_decode($autoresponder_array[0]['body']); $autoresponders_array[0] = $autoresponder_array; @@ -57,11 +51,7 @@ class AutorespondersEdit extends \Panel\Vmail { $f3->set('autoresponder_array', $autoresponder_array); extract($autoresponder_array); $subject = addslashes($subject); - $body = addslashes($body); - $body = str_replace('\"', '\\\\\"', $body); - $body = str_replace("\r\n", '\n', $body); - $body = str_replace("\r", '\n', $body); - $body = str_replace("\n", '\n', $body); + $body = base64_encode($body); /* check for validation errors */ if ($f3->exists('SESSION.messages')) {