{"action":"created","issue":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/10843","repository_url":"https://api.github.com/repos/PrestaShop/PrestaShop","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/10843/labels{/name}","comments_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/10843/comments","events_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/10843/events","html_url":"https://github.com/PrestaShop/PrestaShop/pull/10843","id":366488068,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwMTQ5NTk0","number":10843,"title":"fixing typo in download_product.txt","user":{"login":"antonellamarengo","id":43825951,"node_id":"MDQ6VXNlcjQzODI1OTUx","avatar_url":"https://avatars0.githubusercontent.com/u/43825951?v=4","gravatar_id":"","url":"https://api.github.com/users/antonellamarengo","html_url":"https://github.com/antonellamarengo","followers_url":"https://api.github.com/users/antonellamarengo/followers","following_url":"https://api.github.com/users/antonellamarengo/following{/other_user}","gists_url":"https://api.github.com/users/antonellamarengo/gists{/gist_id}","starred_url":"https://api.github.com/users/antonellamarengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonellamarengo/subscriptions","organizations_url":"https://api.github.com/users/antonellamarengo/orgs","repos_url":"https://api.github.com/users/antonellamarengo/repos","events_url":"https://api.github.com/users/antonellamarengo/events{/privacy}","received_events_url":"https://api.github.com/users/antonellamarengo/received_events","type":"User","site_admin":false},"labels":[{"id":19737369,"node_id":"MDU6TGFiZWwxOTczNzM2OQ==","url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/Bug","name":"Bug","color":"d4c5f9","default":false},{"id":904910825,"node_id":"MDU6TGFiZWw5MDQ5MTA4MjU=","url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/develop","name":"develop","color":"6270ea","default":false},{"id":186105912,"node_id":"MDU6TGFiZWwxODYxMDU5MTI=","url":"https://api.github.com/repos/PrestaShop/PrestaShop/labels/waiting%20for%20author","name":"waiting for author","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones/47","html_url":"https://github.com/PrestaShop/PrestaShop/milestone/47","labels_url":"https://api.github.com/repos/PrestaShop/PrestaShop/milestones/47/labels","id":3591183,"node_id":"MDk6TWlsZXN0b25lMzU5MTE4Mw==","number":47,"title":"1.7.6.0","description":"Development start: 05/10/2018\r\nCode Freeze : 25/01/2019\r\nTarget first Release Candidate :\t08/02/2019\r\nTarget final Release :\t25/02/2019","creator":{"login":"eternoendless","id":1009343,"node_id":"MDQ6VXNlcjEwMDkzNDM=","avatar_url":"https://avatars3.githubusercontent.com/u/1009343?v=4","gravatar_id":"","url":"https://api.github.com/users/eternoendless","html_url":"https://github.com/eternoendless","followers_url":"https://api.github.com/users/eternoendless/followers","following_url":"https://api.github.com/users/eternoendless/following{/other_user}","gists_url":"https://api.github.com/users/eternoendless/gists{/gist_id}","starred_url":"https://api.github.com/users/eternoendless/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eternoendless/subscriptions","organizations_url":"https://api.github.com/users/eternoendless/orgs","repos_url":"https://api.github.com/users/eternoendless/repos","events_url":"https://api.github.com/users/eternoendless/events{/privacy}","received_events_url":"https://api.github.com/users/eternoendless/received_events","type":"User","site_admin":false},"open_issues":72,"closed_issues":9,"state":"open","created_at":"2018-08-22T15:30:13Z","updated_at":"2018-10-05T13:39:57Z","due_on":"2019-02-25T08:00:00Z","closed_at":null},"comments":4,"created_at":"2018-10-03T19:17:47Z","updated_at":"2018-10-05T15:31:22Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/pulls/10843","html_url":"https://github.com/PrestaShop/PrestaShop/pull/10843","diff_url":"https://github.com/PrestaShop/PrestaShop/pull/10843.diff","patch_url":"https://github.com/PrestaShop/PrestaShop/pull/10843.patch"},"body":"Ref. #9785\r\n\r\n| Questions     | Answers\r\n| ------------- | -------------------------------------------------------\r\n| Branch?       | develop\r\n| Description?  | Downloadable product email: Typos in template variables\r\n| Type?         | bug fix\r\n| Category?     | LO\r\n| BC breaks?    | Does it break backward compatibility? no\r\n| Deprecations? | Does it deprecate an existing feature? no\r\n| Fixed ticket? | Fixes #9785\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/prestashop/prestashop/10843)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments/427405922","html_url":"https://github.com/PrestaShop/PrestaShop/pull/10843#issuecomment-427405922","issue_url":"https://api.github.com/repos/PrestaShop/PrestaShop/issues/10843","id":427405922,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzQwNTkyMg==","user":{"login":"dennybiasiolli","id":11649463,"node_id":"MDQ6VXNlcjExNjQ5NDYz","avatar_url":"https://avatars1.githubusercontent.com/u/11649463?v=4","gravatar_id":"","url":"https://api.github.com/users/dennybiasiolli","html_url":"https://github.com/dennybiasiolli","followers_url":"https://api.github.com/users/dennybiasiolli/followers","following_url":"https://api.github.com/users/dennybiasiolli/following{/other_user}","gists_url":"https://api.github.com/users/dennybiasiolli/gists{/gist_id}","starred_url":"https://api.github.com/users/dennybiasiolli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dennybiasiolli/subscriptions","organizations_url":"https://api.github.com/users/dennybiasiolli/orgs","repos_url":"https://api.github.com/users/dennybiasiolli/repos","events_url":"https://api.github.com/users/dennybiasiolli/events{/privacy}","received_events_url":"https://api.github.com/users/dennybiasiolli/received_events","type":"User","site_admin":false},"created_at":"2018-10-05T15:31:22Z","updated_at":"2018-10-05T15:31:22Z","author_association":"NONE","body":"> Some html tags are displayed, can you fix it ?\r\n\r\nHi @marionf, I think the problem is in the way [`OrderHistory.php`](https://github.com/PrestaShop/PrestaShop/blob/develop/classes/order/OrderHistory.php#L156) receives the `{virtualProducts}` parameter.\r\n\r\nIt's created as HTML string in the [following lines](https://github.com/PrestaShop/PrestaShop/blob/develop/classes/order/OrderHistory.php#L137-L149)\r\n\r\n```\r\n$links = '<ul>';\r\nforeach ($assign as $product) {\r\n    $links .= '<li>';\r\n    $links .= '<a href=\"' . $product['link'] . '\">' . Tools::htmlentitiesUTF8($product['name']) . '</a>';\r\n    if (isset($product['deadline'])) {\r\n        $links .= '&nbsp;' . $this->trans('expires on %s.', array($product['deadline']), 'Admin.Orderscustomers.Notification');\r\n    }\r\n    if (isset($product['downloadable'])) {\r\n        $links .= '&nbsp;' . $this->trans('downloadable %d time(s)', array((int) $product['downloadable']), 'Admin.Orderscustomers.Notification');\r\n    }\r\n    $links .= '</li>';\r\n}\r\n$links .= '</ul>';\r\n```\r\n\r\nIt's passed to the `Mail::Send` function as element of `$data` array\r\n\r\n```\r\n'{virtualProducts}' => $links,\r\n```\r\n\r\nLater on, `Mail.php` receives the data in `$templateVars` parameter and in case of txt mail it's not converted back to plain text.\r\n\r\nHow do you suggest to fix this?\r\nI think the best way it's to change the way `virtualProducts` are passed to the template, and in `download_product.txt` and `download_product.html` template loop through the values and display them in the right way.\r\nWhat do you think? Does this approach breaks the other localized mail templates?"}}
{"actor":{"display_login":"dennybiasiolli"}}