php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72016 mailparse_rfc822_parse_addresses removes space in display element
Submitted: 2016-04-13 14:59 UTC Modified: -
From: jochem dot blok at fasterforward dot nl Assigned:
Status: Open Package: mailparse (PECL)
PHP Version: 5.6.20 OS: Ubuntu 14.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jochem dot blok at fasterforward dot nl
New email:
PHP Version: OS:

 

 [2016-04-13 14:59 UTC] jochem dot blok at fasterforward dot nl
Description:
------------
While parsing the addresslist from a mime mail the mailparse_rfc822_parse_addresses is used to split the name from the address. This function removes a space which is in the name.

Test script:
---------------
$a = mailparse_rfc822_parse_addresses('Foo Bar é [TEST] <foo@bar.com>');
var_dump($a);


Expected result:
----------------
array(1) {
  [0]=>
  array(3) {
    ["display"]=>
    string(17) "Foo Bar é [TEST]"
    ["address"]=>
    string(11) "foo@bar.com"
    ["is_group"]=>
    bool(false)
  }
}


Actual result:
--------------
array(1) {
  [0]=>
  array(3) {
    ["display"]=>
    string(16) "Foo Bar é[TEST]"
    ["address"]=>
    string(11) "foo@bar.com"
    ["is_group"]=>
    bool(false)
  }
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC