htmlpurifier
htmlpurifier copied to clipboard
<thead> element removed from <table> if there are no <tbody> or <tr> elements
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
Would imho be fixed with https://github.com/ezyang/htmlpurifier/pull/283