Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 73e6d05

Browse files
committed
Merge branch 'hotfix/26'
Close #26 Fixes zendframework/zend-mail#146
2 parents 085bba4 + e457f2c commit 73e6d05

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ All notable changes to this project will be documented in this file, in reverse
1818

1919
### Fixed
2020

21+
- [#26](https://github.com/zendframework/zend-mime/pull/26) ensures commas
22+
included within list data items are ASCII encoded, ensuring that the items
23+
will split on commas correctly (instead of splitting within an item).
24+
2125
- [#30](https://github.com/zendframework/zend-mime/pull/30) fixes how EOL
2226
characters are detected, to ensure that mail using `\r\n` as an EOL sequence
2327
(including mail emitted by Cyrus and Dovecot) will be properly parsed.

src/Mime.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public static function encodeQuotedPrintableHeader(
193193
$str = self::_encodeQuotedPrintable($str);
194194

195195
// Mail-Header required chars have to be encoded also:
196-
$str = str_replace(['?', ' ', '_'], ['=3F', '=20', '=5F'], $str);
196+
$str = str_replace(['?', ',', ' ', '_'], ['=3F', '=2C', '=20', '=5F'], $str);
197197

198198
// initialize first line, we need it anyways
199199
$lines = [0 => ''];

test/MimeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public static function dataTestEncodeMailHeaderQuotedPrintable()
131131
["äöü", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=B6=C3=BC?="],
132132
["äöü ", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=B6=C3=BC?="],
133133
["Gimme more €", "UTF-8", "=?UTF-8?Q?Gimme=20more=20=E2=82=AC?="],
134-
["Alle meine Entchen schwimmen in dem See, schwimmen in dem See, Köpfchen in das Wasser, Schwänzchen in die Höh!", "UTF-8", "=?UTF-8?Q?Alle=20meine=20Entchen=20schwimmen=20in=20dem=20See,=20?=\n =?UTF-8?Q?schwimmen=20in=20dem=20See,=20K=C3=B6pfchen=20in=20das=20?=\n =?UTF-8?Q?Wasser,=20Schw=C3=A4nzchen=20in=20die=20H=C3=B6h!?="],
134+
["Alle meine Entchen schwimmen in dem See, schwimmen in dem See, Köpfchen in das Wasser, Schwänzchen in die Höh!", "UTF-8", "=?UTF-8?Q?Alle=20meine=20Entchen=20schwimmen=20in=20dem=20See=2C=20?=\n =?UTF-8?Q?schwimmen=20in=20dem=20See=2C=20K=C3=B6pfchen=20in=20das=20?=\n =?UTF-8?Q?Wasser=2C=20Schw=C3=A4nzchen=20in=20die=20H=C3=B6h!?="],
135135
["ääääääääääääääääääääääääääääääääää", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4?="],
136136
["A0", "UTF-8", "=?UTF-8?Q?A0?="],
137137
["äääääääääääääää ä", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=C3=A4=20?=\n =?UTF-8?Q?=C3=A4?="],

0 commit comments

Comments
 (0)