janinedog: (Default)
Janine ([personal profile] janinedog) wrote in [site community profile] changelog2009-04-05 08:24 pm

[dw-free] fix improper escaping on emailed private messages

[commit: http://hg.dwscoalition.org/dw-free/rev/61eeeb8ebdcd]

http://bugs.dwscoalition.org/show_bug.cgi?id=119

Fix escaping of characters in plain-text PM emails.

Patch by [personal profile] kfk2.

Files modified:
  • cgi-bin/LJ/Event/UserMessageRecvd.pm
--------------------------------------------------------------------------------
diff -r e655231982ac -r 61eeeb8ebdcd cgi-bin/LJ/Event/UserMessageRecvd.pm
--- a/cgi-bin/LJ/Event/UserMessageRecvd.pm	Sun Apr 05 16:59:28 2009 +0000
+++ b/cgi-bin/LJ/Event/UserMessageRecvd.pm	Sun Apr 05 20:23:24 2009 +0000
@@ -41,7 +41,7 @@ sub _as_email {
     my $vars = {
         user            => $is_html ? ($u->ljuser_display) : ($u->user),
         subject         => $msg->subject,
-        body            => $msg->body,
+        body            => $is_html ? $msg->body : $msg->body_raw ,
         sender          => $is_html ? ($other_u->ljuser_display) : ($other_u->user),
         postername      => $other_u->user,
         sitenameshort   => $LJ::SITENAMESHORT,
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org