Skip to content
  • Ghada El-Zoghbi's avatar
    Bug1075760: reporting objectional material with no message doesn't get sent to... · 8c7a5e68
    Ghada El-Zoghbi authored and Aaron Wells's avatar Aaron Wells committed
    
    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: default avatarGhada El-Zoghbi <ghada@catalyst-au.net>
    8c7a5e68