mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #19577
[Bug 1271420] Re: Duplicate newlines in forum post notifications if you turn off the HTML editor
Diagnosis so far (going home for the day now):
Text comes in as "Test\r\nTest"
Mahara/lib/web.php::format_whitespace (line 3165) changes this to Test<br>\nTest
Mahara/interaction/forum/lib.php:ActivityTypeInteractionForumNewPost->__construct (Line 939) then does
$post->textbody = trim(html2text($post->body));
giving the two "\n"s.
So it looks like format_whitespace needs to just put <br> or just \n...
will see tomorrow, Lord willing.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1271420
Title:
Duplicate newlines in forum post notifications if you turn off the
HTML editor
Status in Mahara ePortfolio:
In Progress
Status in Mahara 1.10 series:
In Progress
Status in Mahara 1.9 series:
Confirmed
Bug description:
To replicate:
1. Go to your user account settings and turn the HTML editor off
2. Set the forum post delay to 0 minutes (to make testing quicker)
3. Make a forum post that runs across multiple newlines.
4. Look in your Inbox, and look at the email you receive
Expected result: You should see one newline in the message for each newline in the original post
Actual result: You'll see two newlines in the message for each one in the original post.
This does not seem to happen when the HTML editor (TinyMCE) is active.
Possibly TinyMCE strips out the newlines from the text before saving
it.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1271420/+subscriptions
References