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

When we have a closing tag before the current open tag is closed we have different results between HAP and Chrome rendering #542

Open
pauloortins opened this issue Mar 7, 2024 · 0 comments

Comments

@pauloortins
Copy link

When we have a closing tag before the current open tag is closed we have different results between HAP and Chrome rendering.
While chrome moves the wrong closing tag to after the current tag is closed, HAP closes the current tag ending up with an extra closing tag.

HTML: <html><head></head><body><div><form></div></form></body></html>
HAP Result: <html><head></head><body><div><form></form></div></form></body></html>
Chrome Result: <html><head></head><body><div><form></form></div></body></html>

This is the test I used:

var html = @"<html><head></head><body><div><form></div></form></body></html>";
var doc = new HtmlDocument();
doc.LoadHtml(html);
var newHtml = doc.DocumentNode.OuterHtml;  //<html><head></head><body><div><form></form></div></form></body></html>
var res = @"<html><head></head><body><div><form></form></div></body></html>"; //chrome or edge rendering results
var b = newHtml == res; //false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant