{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/angular/issues/23280","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/23280/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/23280/comments","events_url":"https://api.github.com/repos/angular/angular/issues/23280/events","html_url":"https://github.com/angular/angular/issues/23280","id":312747966,"number":23280,"title":"Throw Node is not defined when server-side rendering","user":{"login":"Shinerising","id":2839883,"avatar_url":"https://avatars2.githubusercontent.com/u/2839883?v=4","gravatar_id":"","url":"https://api.github.com/users/Shinerising","html_url":"https://github.com/Shinerising","followers_url":"https://api.github.com/users/Shinerising/followers","following_url":"https://api.github.com/users/Shinerising/following{/other_user}","gists_url":"https://api.github.com/users/Shinerising/gists{/gist_id}","starred_url":"https://api.github.com/users/Shinerising/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shinerising/subscriptions","organizations_url":"https://api.github.com/users/Shinerising/orgs","repos_url":"https://api.github.com/users/Shinerising/repos","events_url":"https://api.github.com/users/Shinerising/events{/privacy}","received_events_url":"https://api.github.com/users/Shinerising/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-10T02:08:22Z","updated_at":"2018-04-10T02:08:22Z","closed_at":null,"author_association":"NONE","body":"<!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n<!-- Check one of the following options with \"x\" -->\r\n<pre><code>\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n</code></pre>\r\n\r\n## Current behavior\r\n<!-- Describe how the issue manifests. -->\r\n\r\nWhen the server-side rendering progress wants to insert a piece of HTML text (like \"Hello <b>bro</b>!\") into template with [innerHTML] but without sanitizer, the terminal throws error message like this: (browser rendering works normally)\r\nERROR ReferenceError: Node is not defined\r\n    at isTemplateElement (.../dist-server/main.js:45681:28)\r\n    at getTemplateContent (.../dist-server/main.js:45676:65)\r\n    at Object._sanitizeHtml [as ɵ_sanitizeHtml] (.../dist-server/main.js:45668:28)\r\n    at DomSanitizerImpl../node_modules/@angular/platform-browser/bundles/platform-browser.umd.js.DomSanitizerImpl.sanitize (.../dist-server/main.js:66931:29)\r\n    ...\r\n\r\n## Expected behavior\r\n<!-- Describe what the desired behavior would be. -->\r\n\r\nThe server-side rendering progress should render safe HTML text directly, for the case that website always need to output some information with format.\r\n\r\n## Minimal reproduction of the problem with instructions\r\n<!--\r\nFor bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via\r\nhttps://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).\r\n-->\r\n\r\n## What is the motivation / use case for changing the behavior?\r\n<!-- Describe the motivation or the concrete use case. -->\r\n\r\nTemplate:\r\n\r\n```HTML\r\n<div class=\"index-quotename\" [innerHTML]=\"item.name\">\r\n</div>\r\n```\r\n\r\nAnd the data fetched from Server likes this\r\n\r\n```JS\r\nitem.name = '<b>foo</b> bar'\r\n```\r\n\r\nBTW, I tried to import the Node modules exported from domino in main.js which server used to render the webpage, and everything works well.\r\n\r\n## Environment\r\n\r\n<pre><code>\r\nAngular version: 6.0.0-rc.3\r\n<!-- Check whether this is still an issue in the most recent Angular version -->\r\n\r\nBrowser:\r\n- [ ] Chrome (desktop) version XX\r\n- [ ] Chrome (Android) version XX\r\n- [ ] Chrome (iOS) version XX\r\n- [ ] Firefox version XX\r\n- [x] Safari (desktop) version 11.2\r\n- [ ] Safari (iOS) version XX\r\n- [ ] IE version XX\r\n- [ ] Edge version XX\r\n \r\nFor Tooling issues:\r\n- Node version: 9.8.0  <!-- run `node --version` -->\r\n- Platform: Mac  <!-- Mac, Linux, Windows -->\r\n\r\nOthers:\r\n<!-- Anything else relevant?  Operating system version, IDE, package manager, HTTP server, ... -->\r\n</code></pre>\r\n"}}
{"actor":{"display_login":"Shinerising"}}