{"action":"created","issue":{"url":"https://api.github.com/repos/mikel/mail/issues/1074","repository_url":"https://api.github.com/repos/mikel/mail","labels_url":"https://api.github.com/repos/mikel/mail/issues/1074/labels{/name}","comments_url":"https://api.github.com/repos/mikel/mail/issues/1074/comments","events_url":"https://api.github.com/repos/mikel/mail/issues/1074/events","html_url":"https://github.com/mikel/mail/pull/1074","id":203443785,"number":1074,"title":"Fix encoding multiple addresses when noninitial address contains non-usascii chars","user":{"login":"domininik","id":103665,"avatar_url":"https://avatars.githubusercontent.com/u/103665?v=3","gravatar_id":"","url":"https://api.github.com/users/domininik","html_url":"https://github.com/domininik","followers_url":"https://api.github.com/users/domininik/followers","following_url":"https://api.github.com/users/domininik/following{/other_user}","gists_url":"https://api.github.com/users/domininik/gists{/gist_id}","starred_url":"https://api.github.com/users/domininik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domininik/subscriptions","organizations_url":"https://api.github.com/users/domininik/orgs","repos_url":"https://api.github.com/users/domininik/repos","events_url":"https://api.github.com/users/domininik/events{/privacy}","received_events_url":"https://api.github.com/users/domininik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/mikel/mail/milestones/5","html_url":"https://github.com/mikel/mail/milestone/5","labels_url":"https://api.github.com/repos/mikel/mail/milestones/5/labels","id":932223,"number":5,"title":"2.7.0","description":null,"creator":{"login":"jeremy","id":199,"avatar_url":"https://avatars.githubusercontent.com/u/199?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":14,"state":"open","created_at":"2015-01-12T20:40:15Z","updated_at":"2017-01-31T00:50:59Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2017-01-26T18:00:33Z","updated_at":"2017-01-31T00:50:59Z","closed_at":"2017-01-31T00:50:59Z","pull_request":{"url":"https://api.github.com/repos/mikel/mail/pulls/1074","html_url":"https://github.com/mikel/mail/pull/1074","diff_url":"https://github.com/mikel/mail/pull/1074.diff","patch_url":"https://github.com/mikel/mail/pull/1074.patch"},"body":"Previous logic of `Encodings.encode_non_usascii` method used the incorrect regular expression `/(\".*?[^\\x00-\\x7F].*?\")/` to find all strings containing non-usascii chars. It matched everything which was before the non-usascii char, even it was a separate address (!).\r\nThis resulted in encoding the whole matched group and losing this address (and as consequence not sending an email to this address at all).\r\n\r\nOne of the possible solutions would be to change the regexp and exclude the quotation mark at the beginning: `(\"[^\"]*?[^\\x00-\\x7F].*?\")` but the regexp can be even more simplified basing on the fact that `Encodings.b_value_encode` does not encode ascii only strings,\r\nso it does not matter if the string passed to it contains the non-usascii chars or not.\r\nThe simplified regexp can just match any string which is between the quotation marks: `/(\".*?\")/`"},"comment":{"url":"https://api.github.com/repos/mikel/mail/issues/comments/276240288","html_url":"https://github.com/mikel/mail/pull/1074#issuecomment-276240288","issue_url":"https://api.github.com/repos/mikel/mail/issues/1074","id":276240288,"user":{"login":"jeremy","id":199,"avatar_url":"https://avatars.githubusercontent.com/u/199?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremy","html_url":"https://github.com/jeremy","followers_url":"https://api.github.com/users/jeremy/followers","following_url":"https://api.github.com/users/jeremy/following{/other_user}","gists_url":"https://api.github.com/users/jeremy/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy/subscriptions","organizations_url":"https://api.github.com/users/jeremy/orgs","repos_url":"https://api.github.com/users/jeremy/repos","events_url":"https://api.github.com/users/jeremy/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy/received_events","type":"User","site_admin":false},"created_at":"2017-01-31T00:50:59Z","updated_at":"2017-01-31T00:50:59Z","body":"Merged @ e95bf67d8c1f25fa96972a98dd658c86c32349e5"}}
{"actor":{"display_login":"jeremy"}}