Duplicate newlines in forum post notifications if you turn off the HTML editor
Bug #1271420 reported by
Aaron Wells
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Invalid
|
Low
|
Nigel Cunningham | ||
1.10 |
Fix Released
|
Low
|
Unassigned | ||
15.04 |
Fix Released
|
Low
|
Nigel Cunningham |
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.
tags: | added: forums notifications |
Changed in mahara: | |
milestone: | none → 1.9.0 |
importance: | Undecided → Low |
status: | New → Confirmed |
no longer affects: | mahara/1.9 |
no longer affects: | mahara/1.10 |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
no longer affects: | mahara/16.04 |
Changed in mahara: | |
status: | In Progress → Invalid |
milestone: | 16.04.0 → none |
To post a comment you must log in.
Diagnosis so far (going home for the day now):
Text comes in as "Test\r\nTest" lib/web. php::format_ whitespace (line 3165) changes this to Test<br>\nTest interaction/ forum/lib. php:ActivityTyp eInteractionFor umNewPost- >__construct (Line 939) then does
Mahara/
Mahara/
$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.