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

CRITICAL BUG: Empty p elements will strip away the end tag #276

Closed
Assassinbeast opened this issue Jan 28, 2019 · 4 comments
Closed

CRITICAL BUG: Empty p elements will strip away the end tag #276

Assassinbeast opened this issue Jan 28, 2019 · 4 comments
Assignees

Comments

@Assassinbeast
Copy link

Assassinbeast commented Jan 28, 2019

If you have an empty p element, then the end tag will not be drawn.
For example making a <p></p> will result in a <p>
It will simply strip away the end tag </p>

But other tags such as h1, h2, span etc. works as expected if they are empty

Heres a code example:

string html =
@"
<!DOCTYPE html>
<html>
<head>
	<title>foo</title>
</head>
<body>
	<p></p>
	<p>Hello</p>
</body>
</html>
";

var doc = new HtmlDocument();
doc.LoadHtml(html);
Console.WriteLine(doc.DocumentNode.OuterHtml);

This will result in this:

image

@JonathanMagnan JonathanMagnan self-assigned this Jan 29, 2019
@JonathanMagnan
Copy link
Member

Hello @Assassinbeast ,

Thank for reporting, we will look at it.

Please, try next time to copy & paste the code instead to show an image. It will save us some time.

Best Regards,

Jonathan


Performance Libraries
context.BulkInsert(list, options => options.BatchSize = 1000);
Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval FunctionSQL Eval Function

@Assassinbeast
Copy link
Author

@JonathanMagnan Updated :-)

@JonathanMagnan
Copy link
Member

Oh great ;) Thank

@JonathanMagnan
Copy link
Member

Hello @Assassinbeast ,

Sorry for the long waiting, the v1.9.2 has been released.

The p tag should now write the ending </p> as expected.

Best Regards,

Jonathan

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

2 participants