Remove quotes around addressee name in case they are encoded.
Some clients encode quotes with name using base64/quoted-printable
encoding. Quotes were removed only for unencoded strings. Now also
encoded names are handled this way.
So, recipient/sender strings are displayed without quotes around
and e.g. saving to addressbook does not save these redundant quotes.
| | |
| | | } |
| | | if ($decode) { |
| | | $name = self::decode_header($name, $fallback); |
| | | // some clients encode addressee name with quotes around it |
| | | if ($name[0] == '"' && $name[strlen($name)-1] == '"') { |
| | | $name = substr($name, 1, -1); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | 21 => '"test test"@domain.tld', |
| | | // invalid (#1489092) |
| | | 22 => '"John Doe @ SomeBusinessName" <MAILER-DAEMON>', |
| | | 23 => '=?UTF-8?B?IlRlc3QsVGVzdCI=?= <test@domain.tld>', |
| | | ); |
| | | |
| | | $results = array( |
| | |
| | | 21 => array(1, '', '"test test"@domain.tld'), |
| | | // invalid (#1489092) |
| | | 22 => array(1, 'John Doe @ SomeBusinessName', 'MAILER-DAEMON'), |
| | | 23 => array(1, 'Test,Test', 'test@domain.tld'), |
| | | ); |
| | | |
| | | foreach ($headers as $idx => $header) { |