zendframework / zend-mime

Mime component from Zend Framework
BSD 3-Clause "New" or "Revised" License
62 stars 37 forks source link

Mime: encode comma #26

Closed glensc closed 6 years ago

glensc commented 7 years ago

this does solve GenericHeader::toString + Header\AbstractAddressList::fromString problem reported here: https://github.com/zendframework/zend-mail/pull/146

weierophinney commented 7 years ago

Interestingly, this causes existing expectations to fail; please review the travis logs. If the existing tests are now incorrect (as the proposed change would encode commas), then please update the unit tests. It the existing tests are correct, then your patch needs updating.

Thanks!

glensc commented 7 years ago

yes, obviously it changes encoding result.

if you accept the change, i can update tests to use updated encoding result. see details in referred PR https://github.com/zendframework/zend-mail/pull/146

there's only one test failing:

1) ZendTest\Mime\MimeTest::testEncodeMailHeaderQuotedPrintable with data set #3 ('Alle meine Entchen schwimmen ... Höh!', 'UTF-8', '=?UTF-8?Q?Alle=20meine=20Entc...B6h!?=')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'=?UTF-8?Q?Alle=20meine=20Entchen=20schwimmen=20in=20dem=20See,=20?=
- =?UTF-8?Q?schwimmen=20in=20dem=20See,=20K=C3=B6pfchen=20in=20das=20?=
- =?UTF-8?Q?Wasser,=20Schw=C3=A4nzchen=20in=20die=20H=C3=B6h!?='
+'=?UTF-8?Q?Alle=20meine=20Entchen=20schwimmen=20in=20dem=20See=2C=20?=
+ =?UTF-8?Q?schwimmen=20in=20dem=20See=2C=20K=C3=B6pfchen=20in=20das=20?=
+ =?UTF-8?Q?Wasser=2C=20Schw=C3=A4nzchen=20in=20die=20H=C3=B6h!?='

updating it, is trivial, so done

glensc commented 7 years ago

@weierophinney the requested changes are made!

weierophinney commented 6 years ago

Thanks, @glensc