HTMLKit
HTMLKit copied to clipboard
some tags in XHTML are not closed after being parsed
When I parse an XHTML, I discovered that the tags in the
are not being closed:<head>
<title>page</title>
<meta charset="utf-8"></meta>
<link href="css/template.css" rel="stylesheet" type="text/css"></link>
</head>
the innerHTML returns:
<head>
<title>page</title>
<meta charset="utf-8">
<link href="css/template.css" rel="stylesheet" type="text/css">
</head>
and for example if I query [document querySelector:@"link"].outerHTML I get
<link href="css/template.css" rel="stylesheet" type="text/css">
[document querySelector:@"meta"].innerHTML
<object returned empty description>
[document querySelector:@"meta"].outerHTML
<meta charset="utf-8">
Title is correct, though. My XHTML is not valid anymore and the Webview fails parsing it. Is there a way to avoid this loss of information? thanks!