{"action":"created","issue":{"url":"https://api.github.com/repos/beautify-web/js-beautify/issues/1170","repository_url":"https://api.github.com/repos/beautify-web/js-beautify","labels_url":"https://api.github.com/repos/beautify-web/js-beautify/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/beautify-web/js-beautify/issues/1170/comments","events_url":"https://api.github.com/repos/beautify-web/js-beautify/issues/1170/events","html_url":"https://github.com/beautify-web/js-beautify/issues/1170","id":218455096,"number":1170,"title":"Invalid attribute name should be ignored","user":{"login":"Janpot","id":2109932,"avatar_url":"https://avatars1.githubusercontent.com/u/2109932?v=3","gravatar_id":"","url":"https://api.github.com/users/Janpot","html_url":"https://github.com/Janpot","followers_url":"https://api.github.com/users/Janpot/followers","following_url":"https://api.github.com/users/Janpot/following{/other_user}","gists_url":"https://api.github.com/users/Janpot/gists{/gist_id}","starred_url":"https://api.github.com/users/Janpot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Janpot/subscriptions","organizations_url":"https://api.github.com/users/Janpot/orgs","repos_url":"https://api.github.com/users/Janpot/repos","events_url":"https://api.github.com/users/Janpot/events{/privacy}","received_events_url":"https://api.github.com/users/Janpot/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-31T09:59:00Z","updated_at":"2017-03-31T20:21:42Z","closed_at":null,"body":"# Description\r\n\r\nLet me start off by noting that this issue is about invalid html. It's a bit of an edge case but let me explain how I obtain this html. I'm trying to beautify a html string that comes from a DOM element that I don't control. I use `element.innerHTML` and feed the result into the html beautifier. Unfortunately some invalid input still produces a working DOM. example:\r\n\r\n```js\r\nnew DOMParser().parseFromString(`<div \"><div>hello</div></div>`, 'text/html').body.innerHTML\r\n// <div \"=\"\"><div>hello</div></div>\r\n```\r\n\r\nIf I understand correctly, parsers should just ignore invalid attribute names and continue parsing.\r\n\r\n# Input\r\nThe code looked like this before beautification:\r\n```\r\n<div \"=\"\"><div>hello</div></div>\r\n\r\n<div \"><div>hello</div></div>\r\n```\r\n\r\n# Expected Output\r\nThe code should have looked like this after beautification:\r\n```\r\n<div \"=\"\">\r\n  <div>hello</div>\r\n</div>\r\n\r\n<div \">\r\n  <div>hello</div>\r\n</div>\r\n```\r\n\r\n# Actual Output\r\nThe  code actually looked like this after beautification:\r\n```\r\n<div \"=\" \"><div>hello</div></div>\r\n\r\n<div \"><div>hello</div></div>\r\n```\r\n\r\n## Settings\r\nDefault\r\n"},"comment":{"url":"https://api.github.com/repos/beautify-web/js-beautify/issues/comments/290819920","html_url":"https://github.com/beautify-web/js-beautify/issues/1170#issuecomment-290819920","issue_url":"https://api.github.com/repos/beautify-web/js-beautify/issues/1170","id":290819920,"user":{"login":"bitwiseman","id":1958953,"avatar_url":"https://avatars0.githubusercontent.com/u/1958953?v=3","gravatar_id":"","url":"https://api.github.com/users/bitwiseman","html_url":"https://github.com/bitwiseman","followers_url":"https://api.github.com/users/bitwiseman/followers","following_url":"https://api.github.com/users/bitwiseman/following{/other_user}","gists_url":"https://api.github.com/users/bitwiseman/gists{/gist_id}","starred_url":"https://api.github.com/users/bitwiseman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitwiseman/subscriptions","organizations_url":"https://api.github.com/users/bitwiseman/orgs","repos_url":"https://api.github.com/users/bitwiseman/repos","events_url":"https://api.github.com/users/bitwiseman/events{/privacy}","received_events_url":"https://api.github.com/users/bitwiseman/received_events","type":"User","site_admin":false},"created_at":"2017-03-31T20:21:42Z","updated_at":"2017-03-31T20:21:42Z","body":"@Janpot - We've tried to use minimal node-specific dependencies in order to support both javascript and python implementations with as much of the codebase being the same as possible.\r\n"}}
{"actor":{"display_login":"bitwiseman"}}