Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some tags in XHTML are not closed after being parsed #34

Open
ecarnevale opened this issue Sep 21, 2018 · 0 comments
Open

some tags in XHTML are not closed after being parsed #34

ecarnevale opened this issue Sep 21, 2018 · 0 comments

Comments

@ecarnevale
Copy link

ecarnevale commented Sep 21, 2018

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!

@ecarnevale ecarnevale changed the title all self closing tags in XHTML are not self closed anymore some tags in XHTML are not closed after being parsed Sep 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant