Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.9.3, 4.3.0
-
None
Description
It seems that in eZ 3.9 eZ has changed the way it assign headers inside a table. It's now assigning the depth of the section to the header's inside af table, no matter what level you assigned in the editor.
Steps to reproduce
I believe this is a bug. An example
<header level="1">Heading 1</header> <header level="2">Heading 2</header> <table border="1" width="100%"> <tr> <td> <header level="1">Heading 1</header> <header level="2">Heading 2</header> </td> </tr> </table>
Gives this HTML
<h2>Heading 1</h2> <h3>Heading 2</h3> <table class="renderedtable" border="1" cellpadding="2" cellspacing="0" width="100%"> <tr> <td valign="top"> <h4>Heading 1</h4> <h5>Heading 2</h5> </td> </tr> </table>
Where the heading 1 and 2 in the table should be h2 and h3, not h3 and h5.
It should possible reset the secion in the table, a quick - but possibly not correct fix is:
--- ezxhtmlxmloutput.php (revision 20191) +++ ezxhtmlxmloutput.php (working copy) @@ -367,6 +367,9 @@ function initHandlerTable( &$element, &$attributes, &$sibilingParams, &$parentParams ) { // Numbers of rows and cols are lower by 1 for back-compatibility. + +$parentParams['section_level'] = 0; + $rows =& $element->children(); $rowCount = count( $rows ); $rowCount--;