rdflib.js
rdflib.js copied to clipboard
Parsing text/html fails on self-closing tags
Parsing an HTML snippet with self closing tags (like <br> or <meta>) produces an error.
It seems that an XML parser is used to parse HTML, but just <br> should be valid for text/html.
$rdf.parse('<p><br></p>', store, baseUrl, "text/html");
fails with XML Parsing Error: mismatched tag. Expected: </br>.
$rdf.parse('<p><br/></p>', store, baseUrl, "text/html");
works as expected.