{"action":"created","issue":{"url":"https://api.github.com/repos/robisim74/angular-l10n/issues/208","repository_url":"https://api.github.com/repos/robisim74/angular-l10n","labels_url":"https://api.github.com/repos/robisim74/angular-l10n/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/robisim74/angular-l10n/issues/208/comments","events_url":"https://api.github.com/repos/robisim74/angular-l10n/issues/208/events","html_url":"https://github.com/robisim74/angular-l10n/issues/208","id":363622890,"node_id":"MDU6SXNzdWUzNjM2MjI4OTA=","number":208,"title":"String with html is rendering as raw html in Safari ","user":{"login":"smlombardi","id":835148,"node_id":"MDQ6VXNlcjgzNTE0OA==","avatar_url":"https://avatars1.githubusercontent.com/u/835148?v=4","gravatar_id":"","url":"https://api.github.com/users/smlombardi","html_url":"https://github.com/smlombardi","followers_url":"https://api.github.com/users/smlombardi/followers","following_url":"https://api.github.com/users/smlombardi/following{/other_user}","gists_url":"https://api.github.com/users/smlombardi/gists{/gist_id}","starred_url":"https://api.github.com/users/smlombardi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smlombardi/subscriptions","organizations_url":"https://api.github.com/users/smlombardi/orgs","repos_url":"https://api.github.com/users/smlombardi/repos","events_url":"https://api.github.com/users/smlombardi/events{/privacy}","received_events_url":"https://api.github.com/users/smlombardi/received_events","type":"User","site_admin":false},"labels":[{"id":757212229,"node_id":"MDU6TGFiZWw3NTcyMTIyMjk=","url":"https://api.github.com/repos/robisim74/angular-l10n/labels/need%20repro","name":"need repro","color":"fce45a","default":false},{"id":256361778,"node_id":"MDU6TGFiZWwyNTYzNjE3Nzg=","url":"https://api.github.com/repos/robisim74/angular-l10n/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-09-25T14:58:43Z","updated_at":"2018-10-06T19:12:11Z","closed_at":null,"author_association":"NONE","body":"**I'm submitting a...**\r\n```\r\n[x ] bug report\r\n[ ] feature request\r\n[ ] support request\r\n```\r\n\r\n**Expected behavior**\r\nOur language strings contain html markup, such as `a` tags.  These render correctly as hyperlinks in all browsers but Safari.  Tried Safari 11 and 12 and iOS12.\r\n\r\n\r\n\r\n**Actual behavior**\r\n\r\n## In Chrome (also in Firefox and Edge):\r\n<img width=\"374\" alt=\"rendering in chrome\" src=\"https://user-images.githubusercontent.com/835148/46023182-1e4eea00-c0b2-11e8-998b-ebaa3fa67d2b.png\">\r\n\r\n## In Safari\r\n<img width=\"411\" alt=\"rendering in safari\" src=\"https://user-images.githubusercontent.com/835148/46023190-20b14400-c0b2-11e8-8784-b1bd44a2928e.png\">\r\n\r\n**Steps to reproduce the behavior**\r\n\r\nComponent code:\r\n```\r\n    <div class=\"alert alert-danger\"\r\n         [innerHTML]=\"'COOKIES_ALERT'\"\r\n         translate></div>\r\n```\r\n\r\nString in `en-us.json`:\r\n```\r\n  \"COOKIES_ALERT\":\r\n    \"For your security, this application uses cookies for sign in. You’ll need to enable cookies in your browser’s settings. <a href='https://www.whatismybrowser.com/guides/how-to-enable-cookies/auto' target='_blank'>Learn how</a>\"\r\n```\r\n\r\n**NOTE** this only happens with l10n translated strings.  Passing the same string directly as a varialble works as expected.\r\n\r\nFor example, assuming `myVar` is the same string as `COOKIES_ALERT` above:\r\n```\r\n    <div class=\"alert alert-danger\"\r\n         [innerHTML]=\"myVar\"\r\n         translate></div>\r\n```\r\n\r\nThis works.\r\n\r\n\r\n**Specifications: Angular version, library version, environment, browser**\r\n```\r\nAngular CLI: 6.0.8\r\nNode: 10.1.0\r\nOS: darwin x64\r\nAngular: undefined\r\n... \r\n\r\nPackage                      Version\r\n------------------------------------------------------\r\n@angular-devkit/architect    0.6.8 (cli-only)\r\n@angular-devkit/core         0.6.8 (cli-only)\r\n@angular-devkit/schematics   0.6.8 (cli-only)\r\n@schematics/angular          0.6.8 (cli-only)\r\n@schematics/update           0.6.8 (cli-only)\r\nrxjs                         6.2.2 (cli-only)\r\ntypescript                   2.7.2\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/robisim74/angular-l10n/issues/comments/427599086","html_url":"https://github.com/robisim74/angular-l10n/issues/208#issuecomment-427599086","issue_url":"https://api.github.com/repos/robisim74/angular-l10n/issues/208","id":427599086,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzU5OTA4Ng==","user":{"login":"danielcollettepb","id":6116867,"node_id":"MDQ6VXNlcjYxMTY4Njc=","avatar_url":"https://avatars0.githubusercontent.com/u/6116867?v=4","gravatar_id":"","url":"https://api.github.com/users/danielcollettepb","html_url":"https://github.com/danielcollettepb","followers_url":"https://api.github.com/users/danielcollettepb/followers","following_url":"https://api.github.com/users/danielcollettepb/following{/other_user}","gists_url":"https://api.github.com/users/danielcollettepb/gists{/gist_id}","starred_url":"https://api.github.com/users/danielcollettepb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielcollettepb/subscriptions","organizations_url":"https://api.github.com/users/danielcollettepb/orgs","repos_url":"https://api.github.com/users/danielcollettepb/repos","events_url":"https://api.github.com/users/danielcollettepb/events{/privacy}","received_events_url":"https://api.github.com/users/danielcollettepb/received_events","type":"User","site_admin":false},"created_at":"2018-10-06T19:12:11Z","updated_at":"2018-10-06T19:12:11Z","author_association":"NONE","body":"I tried another module/component and the directive is still broken in Safari, first alert is the pipe, second directive:\r\n\r\n![image](https://user-images.githubusercontent.com/6116867/46574876-acf81c80-c978-11e8-84c5-00a599e9ccab.png)\r\n\r\nWe were also using `angular-l10n` v5.0.0 and I upgraded to v5.2.0, the issue is still the same in Safari.\r\n\r\nWe have cases where we pass params into the translation with directives:\r\n\r\n```\r\n<p [innerHTML]=\"'TO_SIGN_IN'\"\r\n       translate\r\n       [params]=\"{url: 'http://reset-password.com'} \"></p>\r\n```\r\n\r\nI see how to do this in the [pipe documentation](https://robisim74.github.io/angular-l10n/spec/getting-the-translation/#pure-pipes)... if this works in Safari then we have a solution for now."}}
{"actor":{"display_login":"danielcollettepb"}}