Commit 00a04978 authored by Nigel Cunningham's avatar Nigel Cunningham Committed by Gerrit Code Review
Browse files

(Bug1271420) Duplicate newlines in forum post notifications if you turn off the HTML editor



This patch fixes an issue wherein duplicate newlines
are created in forum post notifications if you turn off
the HTML editor and create a forum post.

Change-Id: I86be96192b56eaa723641c2b55809303109896f0
Signed-off-by: default avatarNigel Cunningham <nigelc@catalyst-au.net>
parent 9cff2a6c
......@@ -8,5 +8,7 @@ This library is for the email_user() function in lib/user.php
Changes:
- none
- Bug 1271420: Change to html2text to string line breaks before
converting HTML to plain text, to avoid duplicate
newlines in the output.
......@@ -2962,6 +2962,9 @@ class PHPMailer
*/
public function html2text($html, $advanced = false)
{
// Strip any pre-existing new lines.
$html = str_replace("\n", '', $html);
if ($advanced) {
require_once 'extras/class.html2text.php';
$htmlconverter = new html2text($html);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment