{"action":"created","issue":{"url":"https://api.github.com/repos/kangax/html-minifier/issues/361","labels_url":"https://api.github.com/repos/kangax/html-minifier/issues/361/labels{/name}","comments_url":"https://api.github.com/repos/kangax/html-minifier/issues/361/comments","events_url":"https://api.github.com/repos/kangax/html-minifier/issues/361/events","html_url":"https://github.com/kangax/html-minifier/issues/361","id":76069293,"number":361,"title":"conservativeCollapse with removeOptionalTags behaves unexpectedly","user":{"login":"dben","id":1358399,"avatar_url":"https://avatars.githubusercontent.com/u/1358399?v=3","gravatar_id":"","url":"https://api.github.com/users/dben","html_url":"https://github.com/dben","followers_url":"https://api.github.com/users/dben/followers","following_url":"https://api.github.com/users/dben/following{/other_user}","gists_url":"https://api.github.com/users/dben/gists{/gist_id}","starred_url":"https://api.github.com/users/dben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dben/subscriptions","organizations_url":"https://api.github.com/users/dben/orgs","repos_url":"https://api.github.com/users/dben/repos","events_url":"https://api.github.com/users/dben/events{/privacy}","received_events_url":"https://api.github.com/users/dben/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kangax/html-minifier/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-05-13T17:53:19Z","updated_at":"2015-08-13T20:49:43Z","closed_at":null,"body":"Using the conservativeCollapse flag with removeOptionalTags unexpectedly renders html options with an additional space (demonstrable on http://kangax.github.io/html-minifier/ )\r\n\r\n```html\r\n<select>\r\n  <option>abc</option>\r\n  <option>def</option>\r\n</select>\r\n```\r\n\r\nbecomes\r\n\r\n```html\r\n<select> <option>abc <option>def </select>\r\n```\r\n\r\nExpected:\r\nclosing </option> tags would not be removed if the result would change option text (with additional whitespace). \r\n\r\n```html\r\n<select> <option>abc</option> <option>def</option> </select>\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kangax/html-minifier/issues/comments/130838102","html_url":"https://github.com/kangax/html-minifier/issues/361#issuecomment-130838102","issue_url":"https://api.github.com/repos/kangax/html-minifier/issues/361","id":130838102,"user":{"login":"davideanderson","id":3507057,"avatar_url":"https://avatars.githubusercontent.com/u/3507057?v=3","gravatar_id":"","url":"https://api.github.com/users/davideanderson","html_url":"https://github.com/davideanderson","followers_url":"https://api.github.com/users/davideanderson/followers","following_url":"https://api.github.com/users/davideanderson/following{/other_user}","gists_url":"https://api.github.com/users/davideanderson/gists{/gist_id}","starred_url":"https://api.github.com/users/davideanderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davideanderson/subscriptions","organizations_url":"https://api.github.com/users/davideanderson/orgs","repos_url":"https://api.github.com/users/davideanderson/repos","events_url":"https://api.github.com/users/davideanderson/events{/privacy}","received_events_url":"https://api.github.com/users/davideanderson/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T20:49:43Z","updated_at":"2015-08-13T20:49:43Z","body":"@duncanbeevers You are correct, but I shouldn't have simplified my example so much, it appears to ALWAYS removes the trailing tag for <dd>, but it isn't always optional, as pointed out in the spec you linked.\r\n\r\nIn my actual project, I was intermixing <dd> tags with <accordion-group> tags in an angular+foundation project.  All of the trailing </dd> tags were omitted, even if the following tag was not a dd or dt element, making the browser assume the following element was a child of the dd element.\r\n"}}