forum post notifications have escaped <br> in message in inbox

Bug #1265049 reported by Robert Lyon
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon
1.8
Fix Released
High
Aaron Wells

Bug Description

For some of the notifications in the inbox (account/activity/index.php) the message has escaped <br> tags.

For example a new forum post notification has output to the screen like:

Re: Topic1
Top of the morning to you!<br />
<br />
How is the weather today?<br />
<br />
Raining still :(

where the <br /> is actually &lt;br /&gt; in the html code.

Tags: regression
Robert Lyon (robertl-9)
summary: - topic notifications have escaped <br> in message in inbox
+ forum post notifications have escaped <br> in message in inbox
Revision history for this message
Robert Lyon (robertl-9) wrote :
Robert Lyon (robertl-9)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Aaron Wells (u-aaronw) wrote :

This is a fairly recent regression. It happens in 1.8_STABLE but not in 1.8.0_RELEASE. We should find out what caused it and fix that, specifically.

Revision history for this message
Aaron Wells (u-aaronw) wrote :

Using git bisect, I traced it to the patch for bug 1075760:

https://reviews.mahara.org/2685
https://reviews.mahara.org/2820

tags: added: regression
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/2952

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/2952
Committed: http://gitorious.org/mahara/mahara/commit/635c615c7d05cccbddf6c93f5c037bc6b843232a
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 635c615c7d05cccbddf6c93f5c037bc6b843232a
Author: Aaron Wells <email address hidden>
Date: Wed Jan 22 18:55:17 2014 +1300

Remove escaped <br> from forum post notifications in Inbox

Bug 1265049: We were converting them to text, but calling str_shorten_html() which
turned them back to HTML.

Change-Id: I725d60b2688faa8459a30bf9b3a395cb4efdc12d

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/2852
Committed: http://gitorious.org/mahara/mahara/commit/2476cf395e5718cac04e1a3294d544b4b04959f4
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 2476cf395e5718cac04e1a3294d544b4b04959f4
Author: Robert Lyon <email address hidden>
Date: Tue Dec 31 08:31:40 2013 +1300

Stripping out escaped <br> from inbox messages (Bug #1265049)

Problem with previous preg_replace regex was it only dealt with things
at the beginning of a line, whereas the extra <br> was at the end of
the lines.

Moved the preg_replace for <br> to be doen first.

Change-Id: Ie8ae09bf0981758f37cbe098be509f6a8540c325
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "1.8_STABLE" branch: https://reviews.mahara.org/3122

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "1.8_STABLE" branch: https://reviews.mahara.org/3123

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/3122
Committed: http://gitorious.org/mahara/mahara/commit/1d6a174a8b8e9332f5b3f8ec7971e134e8346d83
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.8_STABLE

commit 1d6a174a8b8e9332f5b3f8ec7971e134e8346d83
Author: Robert Lyon <email address hidden>
Date: Tue Dec 31 08:31:40 2013 +1300

Stripping out escaped <br> from inbox messages (Bug #1265049)

Problem with previous preg_replace regex was it only dealt with things
at the beginning of a line, whereas the extra <br> was at the end of
the lines.

Moved the preg_replace for <br> to be doen first.

Change-Id: Ie8ae09bf0981758f37cbe098be509f6a8540c325
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/3123
Committed: http://gitorious.org/mahara/mahara/commit/028177af0a03935c4f54b6cc02eca9d3f5de4765
Submitter: Robert Lyon (<email address hidden>)
Branch: 1.8_STABLE

commit 028177af0a03935c4f54b6cc02eca9d3f5de4765
Author: Aaron Wells <email address hidden>
Date: Wed Jan 22 18:55:17 2014 +1300

Remove escaped <br> from forum post notifications in Inbox

Bug 1265049: We were converting them to text, but calling str_shorten_html() which
turned them back to HTML.

Change-Id: I725d60b2688faa8459a30bf9b3a395cb4efdc12d

Revision history for this message
Robert Lyon (robertl-9) wrote :
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
no longer affects: mahara/1.9
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.