htmlpurifier icon indicating copy to clipboard operation
htmlpurifier copied to clipboard

<thead> element removed from <table> if there are no <tbody> or <tr> elements

Open maxgrundnig opened this issue 5 years ago • 1 comments

Using the default config, the <thead> element from a <table> will be removed, if there are no other <tbody> or <tr> elements in the <table>. According to the HTML Living Standard and the W3C Recommendation it is valid to have a <table> element with only a <thead> child.

Here are two Live Demos demonstrating the bug: Bug Expected Output

maxgrundnig avatar Aug 14 '20 07:08 maxgrundnig

Would imho be fixed with https://github.com/ezyang/htmlpurifier/pull/283

marartner avatar Jan 25 '21 11:01 marartner