Hacker News new | ask | show | jobs
by minus7 1072 days ago
`<div />` getting parsed as opening tag instead of self closing is a bug (be it in the browser or in the spec) and should be fixed
2 comments

It's been fixed. Send Content-Type: application/xhtml+xml and it will be parsed as an empty tag. But nobody brothers to turn that on. Without an opt-in it's unfixable due to backward compatibility.
Why would it be a bug in the spec? “/“ is just a parsing error in html and is ignored.