Permalink
Browse files

BUGFIX Correct formatting of "Content-Type: ...; charset=..." header …

…in HTTPResponse and Mailer (breaks Adobe BrowserLab)
  • Loading branch information...
1 parent a30d31a commit 5e9ba3c1d5f9c14ddb6fef543e5493773bcbc596 @chillu chillu committed Jul 15, 2011
Showing with 5 additions and 5 deletions.
  1. +1 −1 control/HTTPResponse.php
  2. +4 −4 email/Mailer.php
@@ -81,7 +81,7 @@ class SS_HTTPResponse {
* @var array
*/
protected $headers = array(
- "Content-Type" => "text/html; charset=\"utf-8\"",
+ "Content-Type" => "text/html; charset=utf-8",
);
/**
View
@@ -66,13 +66,13 @@ function htmlEmail($to, $from, $subject, $htmlContent, $attachedFiles = false, $
$subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
// Make the plain text part
- $headers["Content-Type"] = "text/plain; charset=\"utf-8\"";
+ $headers["Content-Type"] = "text/plain; charset=utf-8";
$headers["Content-Transfer-Encoding"] = $plainEncoding ? $plainEncoding : "quoted-printable";
$plainPart = processHeaders($headers, ($plainEncoding == "base64") ? chunk_split(base64_encode($plainContent),60) : wordwrap(QuotedPrintable_encode($plainContent),75));
// Make the HTML part
- $headers["Content-Type"] = "text/html; charset=\"utf-8\"";
+ $headers["Content-Type"] = "text/html; charset=utf-8";
// Add basic wrapper tags if the body tag hasn't been given
@@ -179,7 +179,7 @@ function plaintextEmail($to, $from, $subject, $plainContent, $attachedFiles, $cu
$subject = "=?UTF-8?B?" . base64_encode($subject) . "?=";
// Make the plain text part
- $headers["Content-Type"] = "text/plain; charset=\"utf-8\"";
+ $headers["Content-Type"] = "text/plain; charset=utf-8";
$headers["Content-Transfer-Encoding"] = $plainEncoding ? $plainEncoding : "quoted-printable";
$plainContent = ($plainEncoding == "base64") ? chunk_split(base64_encode($plainContent),60) : QuotedPrintable_encode($plainContent);
@@ -284,7 +284,7 @@ function wrapImagesInline($htmlContent) {
// Make the HTML part
- $headers["Content-Type"] = "text/html; charset=\"utf-8\"";
+ $headers["Content-Type"] = "text/html; charset=utf-8";
$headers["Content-Transfer-Encoding"] = "quoted-printable";
$multiparts[] = processHeaders($headers, QuotedPrintable_encode($replacedContent));

0 comments on commit 5e9ba3c

Please sign in to comment.