Bug 8626: Fix encoding in cart emails for use of quoted-printable

When using quoted-printable data needs to be encoded accordingly.

Content-Transfer-Encoding: quoted-printable

Without the patch = in URLs or data will be interpreted as the beginning
of a special character resulting in broken URLs.

To test:
- Check diacritics in records display correctly
- Check various URLs with = to make sure they all work correctly

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This is only a partial fix, as the subject line is not encoded,
but it is a huge improvement over what it was before.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
Katrin Fischer 2012-08-14 08:02:59 +02:00 committed by Paul Poulain
parent 88d5a2f2a4
commit 9fe8b5c4cf
1 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ if ( $email_add ) {
my $email_header = "";
if ( $template_res =~ /<HEADER>\n(.*)\n?<END_HEADER>/s ) {
$email_header = $1;
$email_header = encode_qp($1);
}
my $email_file = "basket.txt";
@ -143,7 +143,7 @@ if ( $email_add ) {
}
if ( $template_res =~ /<MESSAGE>\n(.*)\n?<END_MESSAGE>/s ) {
$body = $1;
$body = encode_qp($1);
}
my $boundary = "====" . time() . "====";