Skip to content

Commit

Permalink
We use UTF-8 everywhere. Fixes ticket #1285.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Aug 15, 2010
1 parent a1be33f commit ff1d8ae
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/gallery/controllers/user_profile.php
Expand Up @@ -56,7 +56,7 @@ public function send($id) {
->to($user->email)
->subject(html::clean($form->message->subject->value))
->header("Mime-Version", "1.0")
->header("Content-type", "text/html; charset=iso-8859-1")
->header("Content-type", "text/html; charset=UTF-8")
->reply_to($form->message->reply_to->value)
->message(html::purify($form->message->message->value))
->send();
Expand Down
4 changes: 2 additions & 2 deletions modules/gallery/tests/Sendmail_Test.php
Expand Up @@ -65,14 +65,14 @@ public function sendmail_html_message_test() {
"From: from@gallery3.com\n" .
"Reply-To: public@gallery3.com\n" .
"MIME-Version: 1.0\n" .
"Content-type: text/html; charset=iso-8859-1\r\n" .
"Content-Type: text/html; charset=UTF-8\r\n" .
"Subject: Test Email Unit test\r\n\r\n" .
"<html><body><p>This is an html msg</p></body></html>";
$result = Sendmail_For_Test::factory()
->to("receiver@someemail.com")
->subject("Test Email Unit test")
->header("MIME-Version", "1.0")
->header("Content-type", "text/html; charset=iso-8859-1")
->header("Content-Type", "text/html; charset=UTF-8")
->message("<html><body><p>This is an html msg</p></body></html>")
->send()
->send_text;
Expand Down
2 changes: 1 addition & 1 deletion modules/gallery/views/error_admin.html.php
Expand Up @@ -120,7 +120,7 @@
font-size: 1.1em;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><?= t("Something went wrong!") ?></title>

<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion modules/gallery/views/error_user.html.php
Expand Up @@ -36,7 +36,7 @@
margin: 0 auto;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title><?= t("Something went wrong!") ?></title>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions modules/notification/helpers/notification.php
Expand Up @@ -185,7 +185,7 @@ static function send_pending_notifications() {
->to($email)
->subject($pending->subject)
->header("Mime-Version", "1.0")
->header("Content-type", "text/html; charset=utf-8")
->header("Content-Type", "text/html; charset=UTF-8")
->message($pending->body)
->send();
$pending->delete();
Expand All @@ -199,7 +199,7 @@ static function send_pending_notifications() {
->to($email)
->subject(t("Multiple events have occurred")) // @todo fix this terrible subject line
->header("Mime-Version", "1.0")
->header("Content-type", "text/html; charset=utf-8")
->header("Content-Type", "text/html; charset=UTF-8")
->message($text)
->send();
}
Expand All @@ -213,7 +213,7 @@ private static function _notify($subscribers, $item, $text, $subject) {
->to($subscribers)
->subject($subject)
->header("Mime-Version", "1.0")
->header("Content-type", "text/html; charset=utf-8")
->header("Content-Type", "text/html; charset=UTF-8")
->message($text)
->send();
} else {
Expand Down
2 changes: 1 addition & 1 deletion modules/rest/helpers/rest.php
Expand Up @@ -36,7 +36,7 @@ static function reply($data=array()) {
}

if (preg_match('/^[$A-Za-z_][0-9A-Za-z_]*$/', $callback) == 1) {
header("Content-type: application/javascript");
header("Content-type: application/javascript; charset=UTF-8");
print "$callback(" . json_encode($data) . ")";
} else {
throw new Rest_Exception(
Expand Down
2 changes: 1 addition & 1 deletion modules/user/controllers/password.php
Expand Up @@ -61,7 +61,7 @@ private function _send_reset($form) {
->to($user->email)
->subject(t("Password Reset Request"))
->header("Mime-Version", "1.0")
->header("Content-type", "text/html; charset=iso-8859-1")
->header("Content-type", "text/html; charset=UTF-8")
->message($message->render())
->send();

Expand Down

0 comments on commit ff1d8ae

Please sign in to comment.