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

Incorrect output parsing minified table with a footer #562

Closed
dylanstreb opened this issue Aug 13, 2024 · 3 comments · Fixed by #563
Closed

Incorrect output parsing minified table with a footer #562

dylanstreb opened this issue Aug 13, 2024 · 3 comments · Fixed by #563
Assignees

Comments

@dylanstreb
Copy link
Contributor

1. Description

Incorrect output when parsing minified HTML data including a table with a footer.

The minified output is generated by WebMarkupMin. Chrome is able to display the minified output correctly, so I believe the output from that library is correct. The minified HTML removes end tags, and I believe HAP is not re-adding them in the correct location.

2. Fiddle or Project

Fiddle: https://dotnetfiddle.net/c3wmTU

The relevant part of the minified input is <td>Text<tfoot>

I believe this is relying on the fact that tfoot can only be a child of table to skip the closing tags for td, tr, and tbody. This is what Chrome does - it places the tfoot after the tbody element.

HAP's output is to put the tfoot as a child of td - <td>Text<tfoot><tr><td colspan="3">Footer</td></tr></tfoot></td>

3. Any further technical details

Add any relevant detail can help us, such as:

  • HAP version: 1.11.62
  • NET version: .NET 6.0.32
  • WebMarkupMin.Core: 2.17.0
@JonathanMagnan JonathanMagnan self-assigned this Aug 13, 2024
@JonathanMagnan
Copy link
Member

Hello @dylanstreb ,

Thank you for reporting. Indeed, I don't think HAP currently supports foot correctly. I don't remember having added any code related to it when we fixed recently some issue on the thead and tbody.

We will look at it.

Best Regards,

Jon

@dylanstreb
Copy link
Contributor Author

@JonathanMagnan Your mention of a recent fix gave me enough of a head start to try it. The PR I just submitted fixes my sample code.

@JonathanMagnan
Copy link
Member

Hello @dylanstreb ,

The v1.11.63 has been released.

Thank again for your contribution and helping us to improve this library :)

Best Regards,

Jon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants