mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Correct formatting of "Content-Type: ...; charset=..." header in HTTPResponse and Mailer (breaks Adobe BrowserLab)
This commit is contained in:
parent
a30d31a16a
commit
5e9ba3c1d5
@ -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",
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -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));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user