From: Michael M Slusarz Date: Tue, 2 Dec 2008 22:10:00 +0000 (-0700) Subject: Make 'address' encoding the default. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=71e547fb76c9a4da753fe0fda3a32b2ae3bdad4a;p=horde.git Make 'address' encoding the default. --- diff --git a/framework/Mime/lib/Horde/Mime/Address.php b/framework/Mime/lib/Horde/Mime/Address.php index fcebaca23..d524155ad 100644 --- a/framework/Mime/lib/Horde/Mime/Address.php +++ b/framework/Mime/lib/Horde/Mime/Address.php @@ -364,7 +364,7 @@ class Horde_Mime_Address * in RFC 2822 [3.2.5]. * * @param string $str The string to be quoted and escaped. - * @param string $type Either 'address', 'personal', or null. + * @param string $type Either 'address', or 'personal'; * * @return string The correctly quoted and escaped string. */ @@ -375,15 +375,16 @@ class Horde_Mime_Address $filter = "\0\1\2\3\4\5\6\7\10\12\13\14\15\16\17\20\21\22\23\24\25\26\27\30\31\32\33\34\35\36\37\"(),:;<>@[\\]\177"; switch ($type) { - case 'address': - // RFC 2822 [3.4.1]: (HTAB, SPACE) not allowed in address - $filter .= "\11\40"; - break; - case 'personal': // RFC 2822 [3.4]: Period not allowed in display name $filter .= '.'; break; + + case 'address': + default: + // RFC 2822 [3.4.1]: (HTAB, SPACE) not allowed in address + $filter .= "\11\40"; + break; } // Strip double quotes if they are around the string already.