Open ecarnevale opened 5 years ago
When I parse an XHTML, I discovered that the tags in the
<head> <title>page</title> <meta charset="utf-8"></meta> <link href="css/template.css" rel="stylesheet" type="text/css"></link> </head>
the innerHTML returns:
innerHTML
<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:@"link"].outerHTML
<link href="css/template.css" rel="stylesheet" type="text/css">
[document querySelector:@"meta"].innerHTML <object returned empty description>
[document querySelector:@"meta"].innerHTML
<object returned empty description>
[document querySelector:@"meta"].outerHTML <meta charset="utf-8">
[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!
When I parse an XHTML, I discovered that the tags in the
are not being closed:the
innerHTML
returns: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!