rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Parsing text/html fails on self-closing tags

Open ylebre opened this issue 5 years ago • 0 comments

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.

ylebre avatar Jun 17 '20 17:06 ylebre