Title: incorrectly classified as block elements · Issue #13 · blowsie/Pure-JavaScript-HTML5-Parser · GitHub
Open Graph Title: incorrectly classified as block elements · Issue #13 · blowsie/Pure-JavaScript-HTML5-Parser
X Title: incorrectly classified as block elements · Issue #13 · blowsie/Pure-JavaScript-HTML5-Parser
Description: In the following lines of htmlparser.js, -tag seems to be classified as a block element. Pure-JavaScript-HTML5-Parser/htmlparser.js Lines 92 to 96 in 3e8b2b1 // Block Elements - HTML 5 var block = makeMap("a,address,article,applet,asi...
Open Graph Description: In the following lines of htmlparser.js, -tag seems to be classified as a block element. Pure-JavaScript-HTML5-Parser/htmlparser.js Lines 92 to 96 in 3e8b2b1 // Block Elements - HTML 5 var block...
X Description: In the following lines of htmlparser.js, <a>-tag seems to be classified as a block element. Pure-JavaScript-HTML5-Parser/htmlparser.js Lines 92 to 96 in 3e8b2b1 // Block Elements - HTML 5 var...
Opengraph URL: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser/issues/13
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\u003ca\u003e incorrectly classified as block elements","articleBody":"In the following lines of `htmlparser.js`, \\\u003ca\\\u003e-tag seems to be classified as a block element.\r\n\r\nhttps://github.com/blowsie/Pure-JavaScript-HTML5-Parser/blob/3e8b2b1153a40495f9a16506c778d00150c6b7a3/htmlparser.js#L92-L96\r\n\r\nBut the [w3c spec](https://dev.w3.org/html5/spec-LC/) and this [summary](https://www.w3schools.com/htmL/html_blocks.asp) suggest it should be an inline element instead.\r\n\r\nThis causes an issue with parsing \\\u003ca\\\u003e-tag within an inline element, forcing the latter tag to close before the \\\u003ca\\\u003e-tag begins. \r\n\r\nMinimal examples:\r\n```\r\nHTMLtoXML('\u003cdiv\u003efoo \u003cspan\u003ebar\u003c/span\u003e buz\u003c/div\u003e')\r\n// returns \"\u003cdiv\u003efoo \u003cspan\u003ebar\u003c/span\u003e buz\u003c/div\u003e\"\r\n\r\nHTMLtoXML('\u003cspan\u003e hi \u003ca href=\\\"https://www.w3schools.com\\\"\u003eVisit W3Schools.com!\u003c/a\u003e\u003c/span\u003e')\r\n//returns \"\u003cspan\u003e hi \u003c/span\u003e\u003ca href=\\\"https://www.w3schools.com\\\"\u003eVisit W3Schools.com!\u003c/a\u003e\"\r\n```\r\n\r\n\r\n","author":{"url":"https://github.com/kcf-jackson","@type":"Person","name":"kcf-jackson"},"datePublished":"2020-04-10T18:16:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/13/Pure-JavaScript-HTML5-Parser/issues/13"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3757a1f4-d8e1-0e51-9925-6ece186df5f5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BBFC:D29EC:35CB56:4781F7:6982BCB2 |
| html-safe-nonce | 08d661bc4788a120490d06796240d0c762e0e292dda0b12263de56c05ce977a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQkZDOkQyOUVDOjM1Q0I1Njo0NzgxRjc6Njk4MkJDQjIiLCJ2aXNpdG9yX2lkIjoiNTg4NzM5NTk3OTc1NzUzNDM4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5a5b56fb5cc0ac858672c7f7fc6e37eb3e22a8e1d07fe1830bbfdf02e07210a6 |
| hovercard-subject-tag | issue:598022409 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/blowsie/Pure-JavaScript-HTML5-Parser/13/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c185466942cd1ae6dea9cb9e658c54ed61527bebb98331bb87cd095496093af9/blowsie/Pure-JavaScript-HTML5-Parser/issues/13 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c185466942cd1ae6dea9cb9e658c54ed61527bebb98331bb87cd095496093af9/blowsie/Pure-JavaScript-HTML5-Parser/issues/13 |
| og:image:alt | In the following lines of htmlparser.js, -tag seems to be classified as a block element. Pure-JavaScript-HTML5-Parser/htmlparser.js Lines 92 to 96 in 3e8b2b1 // Block Elements - HTML 5 var block... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kcf-jackson |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6741528aa4d4ba81c57bbff8f8cc0de0e9115cb2993431dc9dac8d489f7b4ee |
| turbo-cache-control | no-preview |
| go-import | github.com/blowsie/Pure-JavaScript-HTML5-Parser git https://github.com/blowsie/Pure-JavaScript-HTML5-Parser.git |
| octolytics-dimension-user_id | 308572 |
| octolytics-dimension-user_login | blowsie |
| octolytics-dimension-repository_id | 10617632 |
| octolytics-dimension-repository_nwo | blowsie/Pure-JavaScript-HTML5-Parser |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 10617632 |
| octolytics-dimension-repository_network_root_nwo | blowsie/Pure-JavaScript-HTML5-Parser |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0d080c1322b22304d6fea611572ebc81cf3ab3d8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width