Bugzilla – Attachment 23018 Details for
Bug 10605
Problems with translated cart email sent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED OFF] Bug 10605: Encoding issue on sending a basket (OPAC)
SIGNED-OFF-Bug-10605-Encoding-issue-on-sending-a-b.patch (text/plain), 2.07 KB, created by
Katrin Fischer
on 2013-11-19 07:41:45 UTC
(
hide
)
Description:
[SIGNED OFF] Bug 10605: Encoding issue on sending a basket (OPAC)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-11-19 07:41:45 UTC
Size:
2.07 KB
patch
obsolete
>From 89e8fa38670ee6f03f7e259688f50bcb3f6ae70d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 14 Nov 2013 12:17:38 +0100 >Subject: [PATCH] [SIGNED OFF] Bug 10605: Encoding issue on sending a basket > (OPAC) > >There is an encoding issue on the received mail. >Here, we have to keep the encode_qp in order not to break links (= is a >special char for email https://en.wikipedia.org/wiki/MIME#Encoded-Word). > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > opac/opac-sendbasket.pl | 22 +++++++++++++++------- > 1 file changed, 15 insertions(+), 7 deletions(-) > >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index da74745..ca3a973 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -127,25 +127,33 @@ if ( $email_add ) { > my $body; > > # Analysing information and getting mail properties >- if ( $template_res =~ /<SUBJECT>\n(.*)\n?<END_SUBJECT>/s ) { >- $mail{'subject'} = $1; >+ >+ if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) { >+ $mail{subject} = $1; >+ $mail{subject} =~ s|\n?(.*)\n?|$1|; > } > else { $mail{'subject'} = "no subject"; } > > my $email_header = ""; >- if ( $template_res =~ /<HEADER>\n(.*)\n?<END_HEADER>/s ) { >- $email_header = encode_qp($1); >+ if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { >+ $email_header = $1; >+ $email_header =~ s|\n?(.*)\n?|$1|; > } > > my $email_file = "basket.txt"; >- if ( $template_res =~ /<FILENAME>\n(.*)\n?<END_FILENAME>/s ) { >+ if ( $template_res =~ /<FILENAME>(.*)<END_FILENAME>/s ) { > $email_file = $1; >+ $email_file =~ s|\n?(.*)\n?|$1|; > } > >- if ( $template_res =~ /<MESSAGE>\n(.*)\n?<END_MESSAGE>/s ) { >- $body = encode_qp($1); >+ if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { >+ $body = $1; >+ $body =~ s|\n?(.*)\n?|$1|; >+ $body = encode("UTF-8", encode_qp($body)); > } > >+ $mail{body} = $body; >+ > my $boundary = "====" . time() . "===="; > > $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10605
:
21428
|
22925
|
22926
|
22996
|
22998
|
22999
|
23018
|
23019
|
23044
|
23045
|
23046