Closed GiovanniSalmeri closed 2 years ago
Hi @GiovanniSalmeri,
thanks for the report. You are right, apparently I was a little lost between to many loops and forgot to properly handle the table body. 🙂 However if I understand right removing the tbody
element currently is not an option because the JS component of this extension needs it. Unfortunately my javascript knowledge is just a little more than copy/paste from CodePen and StackOverflow, therefore I'll add a fix for the broken html element. 📓
Two pieces of good news, just out of curiosity. The first: I have checked now, and the script works perfectly even without an explicit <tbody>
in HTML, because the Javascript engine inserts it automatically in the DOM where it belongs. The second: in HTML4, omitting the tag <tbody>
when <thead>
is present was a syntax error... but not anymore in HTML5: I checked and the validator does not complain. But I understand that fixing the missing tag HTML is a cleaner solution 😊
Thanks for testing! I also can confirm the behaviour, CSV works properly without a tbody
element. Therefore it should be safe to remove it and push an update for the extension. 🙂
Hello @schulle4u. I think I've found a small glitch in Csv extension. When
CsvFirstRowHeader
is set tofalse
, the tag<tbody>
is closed (in csv.php:87), but never opened, because csv.php:81 is not executed. Perhaps the easiest way to solve this is to generate neither the opening<tbody>
nor the closing</tbody>
? They are not mandatory and atbody
element is anyway created in the DOM. Just an idea 😊