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

Commit

Permalink
Merge branch 'hotfix/26'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed Nov 28, 2017
2 parents 085bba4 + e457f2c commit 73e6d05
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ All notable changes to this project will be documented in this file, in reverse

### Fixed

- [#26](https://github.com/zendframework/zend-mime/pull/26) ensures commas
included within list data items are ASCII encoded, ensuring that the items
will split on commas correctly (instead of splitting within an item).

- [#30](https://github.com/zendframework/zend-mime/pull/30) fixes how EOL
characters are detected, to ensure that mail using `\r\n` as an EOL sequence
(including mail emitted by Cyrus and Dovecot) will be properly parsed.
Expand Down
2 changes: 1 addition & 1 deletion src/Mime.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public static function encodeQuotedPrintableHeader(
$str = self::_encodeQuotedPrintable($str);

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

// initialize first line, we need it anyways
$lines = [0 => ''];
Expand Down
2 changes: 1 addition & 1 deletion test/MimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static function dataTestEncodeMailHeaderQuotedPrintable()
["äöü", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=B6=C3=BC?="],
["äöü ", "UTF-8", "=?UTF-8?Q?=C3=A4=C3=B6=C3=BC?="],
["Gimme more €", "UTF-8", "=?UTF-8?Q?Gimme=20more=20=E2=82=AC?="],
["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!?="],
["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!?="],
["ääääääääääääääääääääääääääääääääää", "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?="],
["A0", "UTF-8", "=?UTF-8?Q?A0?="],
["äääääääääääääää ä", "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?="],
Expand Down

0 comments on commit 73e6d05

Please sign in to comment.