Comment 5 for bug 1075760

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

Reviewed: https://reviews.mahara.org/2820
Committed: http://gitorious.org/mahara/mahara/commit/bf6d4c5e6d41958f961aff8e28e5ce721cf6455e
Submitter: Aaron Wells (<email address hidden>)
Branch: 1.8_STABLE

commit bf6d4c5e6d41958f961aff8e28e5ce721cf6455e
Author: Ghada El-Zoghbi <email address hidden>
Date: Tue Nov 5 11:51:34 2013 +1100

Bug1075760: reporting objectional material with no message doesn't get sent to admin with digest emails

Email digest table has a not null contraint for the message field:
1. Force the user to enter something in the objectionable comment.
2. Other areas: if a user enteres a message (i.e. in a forum)
which is made up of html (i.e. a smiley face),
the message gets 'cleaned' by stripping html tags.
This leaves it empty and fails when trying to insert into the
email digest table.
Clean the message with html2text instead of str_shorten_html.
3. As a last resort, before inserting into the email digest table,
make sure there is at least a space in the message field (if it's empty).

Change-Id: I05a77e0682017839b34e74241eefb98fb788eab5
Signed-off-by: Ghada El-Zoghbi <email address hidden>