From d267177f06e641e4bde411ccb451e298ce166588 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 11 Jan 2013 14:46:59 -0500 Subject: [PATCH] Bug 9372 - Automatic carriage return in message_queue where content_type is html - Followup The patch for bug 9372 causes all whitespace to be stripped from a message. This is because the $content variable was previously loaded with the content and then stripped of whitespace to determine if the message had any text. The previous patch for 9372 then used the $content variable as if it were the original unmodified content of the message. --- C4/Letters.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/C4/Letters.pm b/C4/Letters.pm index 4f4acd9..4c77762 100644 --- a/C4/Letters.pm +++ b/C4/Letters.pm @@ -700,8 +700,8 @@ sub EnqueueLetter { } if( $params->{'letter'}->{'content-type'} and ($params->{'letter'}->{'content-type'}=~/html/i )) { - $content=~s/\n/
/g; - $content=~s/\r//g; + $params->{letter}->{content} =~ s/\n/
/g; + $params->{letter}->{content} =~ s/\r//g; } my $dbh = C4::Context->dbh(); my $statement = << 'ENDSQL'; @@ -715,7 +715,7 @@ ENDSQL my $result = $sth->execute( $params->{'borrowernumber'}, # borrowernumber $params->{'letter'}->{'title'}, # subject - $content, # content + $params->{letter}->{content}, # content $params->{'letter'}->{'metadata'} || '', # metadata $params->{'letter'}->{'code'} || '', # letter_code $params->{'message_transport_type'}, # message_transport_type -- 1.7.2.5