diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-09-18 20:28:03 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-09-18 20:28:03 +0200 |
commit | bd4e4c94416613145edca00156831fb283024684 (patch) | |
tree | 9f3f159966111332d3a35cba44244b2c1636035e | |
parent | e7ebc1587d140733df0d96dc944bfab0299e9644 (diff) | |
download | rpg-bd4e4c94416613145edca00156831fb283024684.tar.gz rpg-bd4e4c94416613145edca00156831fb283024684.tar.bz2 |
add linebreaks and escaping in digest HTML mails FS#2606
this is a temporary and somewhat ugly fix. digest subscriptions should
make use of the inline format just as the 'every' subscriptions do.
But it makes sense to implement it correctly in the subscription branch
instead and not introduce new code in the RC.
-rw-r--r-- | inc/subscription.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/subscription.php b/inc/subscription.php index 029d93e66..6b201c266 100644 --- a/inc/subscription.php +++ b/inc/subscription.php @@ -396,12 +396,14 @@ function subscription_send($subscriber_mail, $replaces, $subject, $id, $template $text = rawLocale($template); $trep = array_merge($replaces, array('PAGE' => $id)); + $hrep = $trep; + $hrep['DIFF'] = nl2br(htmlspecialchars($hrep['DIFF'])); $subject = $lang['mail_' . $subject] . ' ' . $id; $mail = new Mailer(); $mail->bcc($subscriber_mail); $mail->subject($subject); - $mail->setBody($text,$trep); + $mail->setBody($text,$trep,$hrep); $mail->from($conf['mailfromnobody']); $mail->setHeader( 'List-Unsubscribe', |