Bug 12065: use encode_qp consistently when sending basket/shelf
QP-encode both mail header and mail body when sending baskets or shelves. There is no need to Encode qp-encoded strings. Note that this does not solve all possible encoding problems in the mail sent. This is related to decoding CGI parameters and use of TT. That problem is addressed in bug 11944. Test plan: Verify if sending a basket from opac and staff still works. Check if sending a shelf (list) from opac and staff still functions as expected. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Cart/List sent form opac/staff works No koha-qa errors Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
parent
31781ffb02
commit
76e8bb0fab
|
|
@ -122,6 +122,7 @@ if ( $email_add ) {
|
|||
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
|
||||
$email_header = $1;
|
||||
$email_header =~ s|\n?(.*)\n?|$1|;
|
||||
$email_header = encode_qp($email_header);
|
||||
}
|
||||
|
||||
my $email_file = "basket.txt";
|
||||
|
|
@ -133,19 +134,12 @@ if ( $email_add ) {
|
|||
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
|
||||
$body = $1;
|
||||
$body =~ s|\n?(.*)\n?|$1|;
|
||||
$body = encode("UTF-8", encode_qp($body));
|
||||
$body = encode_qp($body);
|
||||
}
|
||||
|
||||
my $boundary = "====" . time() . "====";
|
||||
|
||||
# $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
|
||||
#
|
||||
# $email_header = encode_qp($email_header);
|
||||
#
|
||||
# $boundary = "--".$boundary;
|
||||
#
|
||||
# # Writing mail
|
||||
# $mail{body} =
|
||||
# Writing mail
|
||||
$mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\"";
|
||||
my $isofile = encode_base64(encode("UTF-8", $iso2709));
|
||||
$boundary = '--' . $boundary;
|
||||
|
|
|
|||
|
|
@ -138,6 +138,7 @@ if ( $email_add ) {
|
|||
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
|
||||
$email_header = $1;
|
||||
$email_header =~ s|\n?(.*)\n?|$1|;
|
||||
$email_header = encode_qp($email_header);
|
||||
}
|
||||
|
||||
my $email_file = "basket.txt";
|
||||
|
|
@ -149,7 +150,7 @@ if ( $email_add ) {
|
|||
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
|
||||
$body = $1;
|
||||
$body =~ s|\n?(.*)\n?|$1|;
|
||||
$body = encode("UTF-8", encode_qp($body));
|
||||
$body = encode_qp($body);
|
||||
}
|
||||
|
||||
$mail{body} = $body;
|
||||
|
|
|
|||
|
|
@ -135,6 +135,7 @@ if ( $email ) {
|
|||
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
|
||||
$email_header = $1;
|
||||
$email_header =~ s|\n?(.*)\n?|$1|;
|
||||
$email_header = encode_qp($email_header);
|
||||
}
|
||||
|
||||
my $email_file = "list.txt";
|
||||
|
|
@ -146,7 +147,7 @@ if ( $email ) {
|
|||
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
|
||||
$body = $1;
|
||||
$body =~ s|\n?(.*)\n?|$1|;
|
||||
$body = encode("UTF-8", encode_qp($body));
|
||||
$body = encode_qp($body);
|
||||
}
|
||||
|
||||
my $boundary = "====" . time() . "====";
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ if ( $email ) {
|
|||
if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) {
|
||||
$email_header = $1;
|
||||
$email_header =~ s|\n?(.*)\n?|$1|;
|
||||
$email_header = encode_qp($email_header);
|
||||
}
|
||||
|
||||
my $email_file = "list.txt";
|
||||
|
|
@ -137,7 +138,7 @@ if ( $email ) {
|
|||
if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) {
|
||||
$body = $1;
|
||||
$body =~ s|\n?(.*)\n?|$1|;
|
||||
$body = encode("UTF-8", encode_qp($body));
|
||||
$body = encode_qp($body);
|
||||
}
|
||||
|
||||
my $boundary = "====" . time() . "====";
|
||||
|
|
|
|||
Loading…
Reference in New Issue