{"action":"created","issue":{"url":"https://api.github.com/repos/miniflux/miniflux/issues/157","repository_url":"https://api.github.com/repos/miniflux/miniflux","labels_url":"https://api.github.com/repos/miniflux/miniflux/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/miniflux/miniflux/issues/157/comments","events_url":"https://api.github.com/repos/miniflux/miniflux/issues/157/events","html_url":"https://github.com/miniflux/miniflux/pull/157","id":334990858,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk2ODIzNTM4","number":157,"title":"Updated Sanitizer to better handle noscript tags.","user":{"login":"dzaikos","id":1633653,"node_id":"MDQ6VXNlcjE2MzM2NTM=","avatar_url":"https://avatars3.githubusercontent.com/u/1633653?v=4","gravatar_id":"","url":"https://api.github.com/users/dzaikos","html_url":"https://github.com/dzaikos","followers_url":"https://api.github.com/users/dzaikos/followers","following_url":"https://api.github.com/users/dzaikos/following{/other_user}","gists_url":"https://api.github.com/users/dzaikos/gists{/gist_id}","starred_url":"https://api.github.com/users/dzaikos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dzaikos/subscriptions","organizations_url":"https://api.github.com/users/dzaikos/orgs","repos_url":"https://api.github.com/users/dzaikos/repos","events_url":"https://api.github.com/users/dzaikos/events{/privacy}","received_events_url":"https://api.github.com/users/dzaikos/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-22T19:19:28Z","updated_at":"2018-06-24T00:51:26Z","closed_at":"2018-06-24T00:50:44Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/miniflux/miniflux/pulls/157","html_url":"https://github.com/miniflux/miniflux/pull/157","diff_url":"https://github.com/miniflux/miniflux/pull/157.diff","patch_url":"https://github.com/miniflux/miniflux/pull/157.patch"},"body":"Go's x/net/html doesn't handle `noscript` tags well. It assumes the entire contents of any noscript tag is a text node, which is not always the case. There's an [open issue](https://github.com/golang/go/issues/16318) tracking it for two years now but the issue remains.\r\n\r\nWhat I've found is that many sites lazy load images and use noscript as a fall back. Currently the Sanitizer strips noscript but because the subsequent content is returned as a text node it ends up putting HTML in the article. So the article ends up looking like this (with actual HTML code right alongside normal text):\r\n\r\n> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum ac urna sed purus mollis convallis ac ut libero. Ut quis.\r\n>\r\n> \\<div class=\"lazyload-fallback\">\r\n>     \\<img src=\"medium-res.jpg\" alt=\"\">\r\n> \\</div>\r\n>\r\n> Vestibulum auctor nulla purus, sed ultricies eros fringilla ut. Sed a nisl ante. Integer quis tempor nisl. Nunc.\r\n\r\nThis PR allows the sanitizer to track `noscript` and filter out its content from the article.\r\n\r\n**Update:** Looks like this affects the `script` tag as well. ~~I'll wait to get your response for this PR and if you're good with it make some tweaks to include both script and noscript.~~\r\n\r\n**Update 2:** Added support for filtering both `script` and `noscript` tags."},"comment":{"url":"https://api.github.com/repos/miniflux/miniflux/issues/comments/399720697","html_url":"https://github.com/miniflux/miniflux/pull/157#issuecomment-399720697","issue_url":"https://api.github.com/repos/miniflux/miniflux/issues/157","id":399720697,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTcyMDY5Nw==","user":{"login":"fguillot","id":323546,"node_id":"MDQ6VXNlcjMyMzU0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/323546?v=4","gravatar_id":"","url":"https://api.github.com/users/fguillot","html_url":"https://github.com/fguillot","followers_url":"https://api.github.com/users/fguillot/followers","following_url":"https://api.github.com/users/fguillot/following{/other_user}","gists_url":"https://api.github.com/users/fguillot/gists{/gist_id}","starred_url":"https://api.github.com/users/fguillot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fguillot/subscriptions","organizations_url":"https://api.github.com/users/fguillot/orgs","repos_url":"https://api.github.com/users/fguillot/repos","events_url":"https://api.github.com/users/fguillot/events{/privacy}","received_events_url":"https://api.github.com/users/fguillot/received_events","type":"User","site_admin":false},"created_at":"2018-06-24T00:51:26Z","updated_at":"2018-06-24T00:51:26Z","author_association":"CONTRIBUTOR","body":"Thanks for your PR. I didn't test yet, but maybe this is the same with the `<style/>` tag."}}
{"actor":{"display_login":"fguillot"}}