Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[livejournal] r16851: LJSV-1070 (If there are encoding problem...

Committer: ailyin
LJSV-1070 (If there are encoding problems in support request, notifications are sent empty)
U   trunk/cgi-bin/supportlib.pl
Modified: trunk/cgi-bin/supportlib.pl
===================================================================
--- trunk/cgi-bin/supportlib.pl	2010-06-21 09:17:01 UTC (rev 16850)
+++ trunk/cgi-bin/supportlib.pl	2010-06-21 09:58:09 UTC (rev 16851)
@@ -1121,6 +1121,8 @@
 package LJ::Worker::SupportNotify;
 use base 'TheSchwartz::Worker';
 
+use LJ::Text;
+
 sub work {
     my ($class, $job) = @_;
     my $a = $job->arg;
@@ -1146,16 +1148,17 @@
     my $body;
     my @emails;
 
+    my $req_subject = LJ::Text->fix_utf8($sp->{'subject'});
     if ($type eq 'new') {
         $body = "A $LJ::SITENAME support request has been submitted regarding the following:\n\n";
         $body .= "Category: $sp->{_cat}{catname}\n";
-        $body .= "Subject:  $sp->{subject}\n\n";
+        $body .= "Subject:  $req_subject\n\n";
         $body .= "You can track its progress or add information here:\n\n";
         $body .= "$LJ::SITEROOT/support/see_request.bml?id=$spid";
         $body .= "\n\nIf you do not wish to receive notifications of incoming support requests, you may change your notification settings here:\n\n";
         $body .= "$LJ::SITEROOT/support/changenotify.bml";
         $body .= "\n\n" . "="x70 . "\n\n";
-        $body .= $sp->{body};
+        $body .= LJ::Text->fix_utf8($sp->{body});
 
         foreach my $u (values %$userids) {
             next unless $u->is_visible;
@@ -1171,12 +1174,12 @@
                                   undef, $sp->{spid}, $a->{splid}+0);
 
         # build body
-        $body = "A follow-up to the request regarding \"$sp->{subject}\" has ";
+        $body = "A follow-up to the request regarding \"$req_subject\" has ";
         $body .= "been submitted.  You can track its progress or add ";
         $body .= "information here:\n\n  ";
         $body .= "$LJ::SITEROOT/support/see_request.bml?id=$spid";
         $body .= "\n\n" . "="x70 . "\n\n";
-        $body .= $resp;
+        $body .= LJ::Text->fix_utf8($resp);
 
         # now see who this should be sent to
         foreach my $u (values %$userids) {

Tags: andy, livejournal, pl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments