{"action":"opened","issue":{"url":"https://api.github.com/repos/glennjones/microformat-node/issues/27","repository_url":"https://api.github.com/repos/glennjones/microformat-node","labels_url":"https://api.github.com/repos/glennjones/microformat-node/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/glennjones/microformat-node/issues/27/comments","events_url":"https://api.github.com/repos/glennjones/microformat-node/issues/27/events","html_url":"https://github.com/glennjones/microformat-node/issues/27","id":147887434,"number":27,"title":"HTML entity handling","user":{"login":"notenoughneon","id":6900431,"avatar_url":"https://avatars.githubusercontent.com/u/6900431?v=3","gravatar_id":"","url":"https://api.github.com/users/notenoughneon","html_url":"https://github.com/notenoughneon","followers_url":"https://api.github.com/users/notenoughneon/followers","following_url":"https://api.github.com/users/notenoughneon/following{/other_user}","gists_url":"https://api.github.com/users/notenoughneon/gists{/gist_id}","starred_url":"https://api.github.com/users/notenoughneon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/notenoughneon/subscriptions","organizations_url":"https://api.github.com/users/notenoughneon/orgs","repos_url":"https://api.github.com/users/notenoughneon/repos","events_url":"https://api.github.com/users/notenoughneon/events{/privacy}","received_events_url":"https://api.github.com/users/notenoughneon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-12T22:02:42Z","updated_at":"2016-04-12T22:02:42Z","closed_at":null,"body":"HTML entities are indistinguishable from actual tags in the \"html\" part of e- properties. Additionally, value and p- properties may be corrupted when using textFormat: whitespacetrimmed.\r\n\r\nTest case:\r\n```html\r\n<div class=\"h-entry\">\r\n    <div class=\"p-name e-content\">x&lt;y AT&amp;T &lt;b&gt;NotBold&lt;/b&gt; <b>Bold</b></div>\r\n</div>\r\n```\r\nOutput (textformat: 'whitespacetrimmed'):\r\n```json\r\n{\r\n    \"items\": [{\r\n        \"type\": [\"h-entry\"],\r\n        \"properties\": {\r\n            \"name\": [\"xNotBold Bold\"],\r\n            \"content\": [{\r\n                \"value\": \"xNotBold Bold\",\r\n                \"html\": \"x<y AT&T <b>NotBold</b> <b>Bold</b>\"\r\n            }]\r\n        }\r\n    }],\r\n    \"rels\": {},\r\n    \"rel-urls\": {}\r\n}\r\n```\r\nOutput (textFormat: 'normalised'):\r\n```json\r\n{\r\n    \"items\": [{\r\n        \"type\": [\"h-entry\"],\r\n        \"properties\": {\r\n            \"name\": [\"x<y AT&T <b>NotBold</b> Bold\"],\r\n            \"content\": [{\r\n                \"value\": \"x<y AT&T <b>NotBold</b> Bold\",\r\n                \"html\": \"x<y AT&T <b>NotBold</b> <b>Bold</b>\"\r\n            }]\r\n        }\r\n    }],\r\n    \"rels\": {},\r\n    \"rel-urls\": {}\r\n}\r\n```\r\nExpected for both cases:\r\n```json\r\n{\r\n    \"items\": [{\r\n        \"type\": [\"h-entry\"],\r\n        \"properties\": {\r\n            \"name\": [\"x<y AT&T <b>NotBold</b> Bold\"],\r\n            \"content\": [{\r\n                \"value\": \"x<y AT&T <b>NotBold</b> Bold\",\r\n                \"html\": \"x&lt;y AT&amp;T &lt;b&gt;NotBold&lt;/b&gt; <b>Bold</b>\"\r\n            }]\r\n        }\r\n    }],\r\n    \"rels\": {},\r\n    \"rel-urls\": {}\r\n}\r\n```"}}