{"action":"closed","number":12562,"pull_request":{"url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562","id":203850313,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODUwMzEz","html_url":"https://github.com/civicrm/civicrm-core/pull/12562","diff_url":"https://github.com/civicrm/civicrm-core/pull/12562.diff","patch_url":"https://github.com/civicrm/civicrm-core/pull/12562.patch","issue_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/12562","number":12562,"state":"closed","locked":false,"title":"Mailing - ignore case-sensitive string when extracting category from mail template tokens","user":{"login":"michaeljanuszkiewicz","id":5859294,"node_id":"MDQ6VXNlcjU4NTkyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5859294?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeljanuszkiewicz","html_url":"https://github.com/michaeljanuszkiewicz","followers_url":"https://api.github.com/users/michaeljanuszkiewicz/followers","following_url":"https://api.github.com/users/michaeljanuszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/michaeljanuszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeljanuszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeljanuszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/michaeljanuszkiewicz/orgs","repos_url":"https://api.github.com/users/michaeljanuszkiewicz/repos","events_url":"https://api.github.com/users/michaeljanuszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/michaeljanuszkiewicz/received_events","type":"User","site_admin":false},"body":"Overview\r\n----------------------------------------\r\nIt looks like tokens that are 'alone' inside an HTML are accidentally stripped out of the plain text version that CiviCRM generates.\r\n\r\nSteps to recreate\r\n\r\n* Set outbound emial to redirect to DB\r\n* Create a new mailing with the HTML\r\n```\r\n<html>\r\n<head>\r\n<title></title>\r\n</head>\r\n<body>\r\n<p>Serial BOLD&nbsp;1:&nbsp;<strong>{contact.display_name}</strong></p>\r\n<p>Serial 2:&nbsp;{contact.display_name}</p>\r\n<p>Serial 2:&nbsp;{CONTACT.DISPLAY_NAME}</p>\r\n</body>\r\n</html>\r\n```\r\n\r\n* Send it\r\n* Check the civicrm_mailing_spool table\r\n* Inspect the body field\r\n* Notice that it is correct in HTML version, but missing in plain text version\r\n\r\n\r\nBefore\r\n----------------------------------------\r\nExample:\r\n![image](https://user-images.githubusercontent.com/5859294/43250933-6dfd70b6-90b6-11e8-8c44-fe0d2e1c9340.png)\r\n\r\nAfter\r\n----------------------------------------\r\nExample:\r\n![image](https://user-images.githubusercontent.com/5859294/43271197-d3e22c5e-90ee-11e8-8b7b-1dad25487e5a.png)\r\n\r\n\r\nTechnical Details\r\n----------------------------------------\r\nCivi CRM_Utils_String::htmlToText use library: rcube_html2text (file: CRM_Mailing_BAO_Mailing). Library convert html template to text version.\r\n\r\nFor tags like: strong, b, th, etc.. (look variable: callback_search and method: tags_preg_callback in class rcube_html2text )\r\nmethod is removing specified tags and return string which is uppercase. \r\nExample: <strong>token:{contact.display_name}</strong> will be converted to TOKEN:{CONTACT.DISPLAY_NAME}\r\nCiviCrm not processing uppercase tokens.\r\n","created_at":"2018-07-25T14:09:54Z","updated_at":"2018-11-19T10:35:15Z","closed_at":"2018-11-19T10:35:15Z","merged_at":null,"merge_commit_sha":"44f40ca740c313b546d021a00cbae6c5c8ffaf31","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":246037889,"node_id":"MDU6TGFiZWwyNDYwMzc4ODk=","url":"https://api.github.com/repos/civicrm/civicrm-core/labels/master","name":"master","color":"0052cc","default":false},{"id":962692784,"node_id":"MDU6TGFiZWw5NjI2OTI3ODQ=","url":"https://api.github.com/repos/civicrm/civicrm-core/labels/needs-test","name":"needs-test","color":"fffa7f","default":false},{"id":30205961,"node_id":"MDU6TGFiZWwzMDIwNTk2MQ==","url":"https://api.github.com/repos/civicrm/civicrm-core/labels/sig:bug","name":"sig:bug","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562/commits","review_comments_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562/comments","review_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/12562/comments","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/ce021b8741c51b6433665a3d44e78bd510593367","head":{"label":"michaeljanuszkiewicz:CW-673","ref":"CW-673","sha":"ce021b8741c51b6433665a3d44e78bd510593367","user":{"login":"michaeljanuszkiewicz","id":5859294,"node_id":"MDQ6VXNlcjU4NTkyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5859294?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeljanuszkiewicz","html_url":"https://github.com/michaeljanuszkiewicz","followers_url":"https://api.github.com/users/michaeljanuszkiewicz/followers","following_url":"https://api.github.com/users/michaeljanuszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/michaeljanuszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeljanuszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeljanuszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/michaeljanuszkiewicz/orgs","repos_url":"https://api.github.com/users/michaeljanuszkiewicz/repos","events_url":"https://api.github.com/users/michaeljanuszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/michaeljanuszkiewicz/received_events","type":"User","site_admin":false},"repo":{"id":142304592,"node_id":"MDEwOlJlcG9zaXRvcnkxNDIzMDQ1OTI=","name":"civicrm-core","full_name":"michaeljanuszkiewicz/civicrm-core","private":false,"owner":{"login":"michaeljanuszkiewicz","id":5859294,"node_id":"MDQ6VXNlcjU4NTkyOTQ=","avatar_url":"https://avatars0.githubusercontent.com/u/5859294?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeljanuszkiewicz","html_url":"https://github.com/michaeljanuszkiewicz","followers_url":"https://api.github.com/users/michaeljanuszkiewicz/followers","following_url":"https://api.github.com/users/michaeljanuszkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/michaeljanuszkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeljanuszkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeljanuszkiewicz/subscriptions","organizations_url":"https://api.github.com/users/michaeljanuszkiewicz/orgs","repos_url":"https://api.github.com/users/michaeljanuszkiewicz/repos","events_url":"https://api.github.com/users/michaeljanuszkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/michaeljanuszkiewicz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/michaeljanuszkiewicz/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":true,"url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core","forks_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/forks","keys_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/teams","hooks_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/events","assignees_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/tags","blobs_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/subscription","commits_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/merges","archive_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/downloads","issues_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/michaeljanuszkiewicz/civicrm-core/deployments","created_at":"2018-07-25T13:34:38Z","updated_at":"2018-07-25T13:34:57Z","pushed_at":"2018-07-26T10:55:22Z","git_url":"git://github.com/michaeljanuszkiewicz/civicrm-core.git","ssh_url":"git@github.com:michaeljanuszkiewicz/civicrm-core.git","clone_url":"https://github.com/michaeljanuszkiewicz/civicrm-core.git","svn_url":"https://github.com/michaeljanuszkiewicz/civicrm-core","homepage":null,"size":163791,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"civicrm:master","ref":"master","sha":"928cdeb50079894e23a84b86a182505133c60995","user":{"login":"civicrm","id":136373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/136373?v=4","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":8495499,"node_id":"MDEwOlJlcG9zaXRvcnk4NDk1NDk5","name":"civicrm-core","full_name":"civicrm/civicrm-core","private":false,"owner":{"login":"civicrm","id":136373,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzNjM3Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/136373?v=4","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/civicrm/civicrm-core","description":"CiviCRM (Core Application and Framework)","fork":false,"url":"https://api.github.com/repos/civicrm/civicrm-core","forks_url":"https://api.github.com/repos/civicrm/civicrm-core/forks","keys_url":"https://api.github.com/repos/civicrm/civicrm-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civicrm-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civicrm-core/teams","hooks_url":"https://api.github.com/repos/civicrm/civicrm-core/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civicrm-core/events","assignees_url":"https://api.github.com/repos/civicrm/civicrm-core/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civicrm-core/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civicrm-core/tags","blobs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civicrm-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civicrm-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civicrm-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civicrm-core/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civicrm-core/languages","stargazers_url":"https://api.github.com/repos/civicrm/civicrm-core/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civicrm-core/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civicrm-core/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civicrm-core/subscription","commits_url":"https://api.github.com/repos/civicrm/civicrm-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civicrm-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civicrm-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civicrm-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civicrm-core/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civicrm-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civicrm-core/merges","archive_url":"https://api.github.com/repos/civicrm/civicrm-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civicrm-core/downloads","issues_url":"https://api.github.com/repos/civicrm/civicrm-core/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civicrm-core/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civicrm-core/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civicrm-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civicrm-core/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civicrm-core/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civicrm-core/deployments","created_at":"2013-03-01T06:11:56Z","updated_at":"2018-11-19T02:03:26Z","pushed_at":"2018-11-19T07:35:26Z","git_url":"git://github.com/civicrm/civicrm-core.git","ssh_url":"git@github.com:civicrm/civicrm-core.git","clone_url":"https://github.com/civicrm/civicrm-core.git","svn_url":"https://github.com/civicrm/civicrm-core","homepage":null,"size":170037,"stargazers_count":301,"watchers_count":301,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":653,"mirror_url":null,"archived":false,"open_issues_count":74,"license":null,"forks":653,"open_issues":74,"watchers":301,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562"},"html":{"href":"https://github.com/civicrm/civicrm-core/pull/12562"},"issue":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/12562"},"comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/issues/12562/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civicrm-core/pulls/12562/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civicrm-core/statuses/ce021b8741c51b6433665a3d44e78bd510593367"}},"author_association":"NONE","merged":false,"mergeable":true,"rebaseable":true,"mergeable_state":"clean","merged_by":null,"comments":13,"review_comments":0,"maintainer_can_modify":false,"commits":2,"additions":11,"deletions":0,"changed_files":1}}
{"actor":{"display_login":"eileenmcnaughton"}}