Hello,
Previously I posted a display error where the <tbody> tags are being interpreted as <tbody><br /> tags. Please see the screen shot to see what this does to the output in Drupal.
The original code that is saved in the node is -
<p>This example shows the extra <br /> tags that are being added to table output.
<table cellspacing="0" cellpadding="0" summary="" border="1">
<tbody>
<tr>
<td>
<p>This is the first line in the table</p>
</td>
</tr>
<tr>
<td>This is the second line in the table</td>
</tr>
</tbody>
</table>
In the original HTML code there is no extra line breaks around this table, but when displayed in Drupal the extra line breaks appear. </p>
The HTML generated by Drupal is -
<p>This example shows the extra <br /> tags that are being added to table output.</p>
<table cellspacing="0" cellpadding="0" summary="" border="1">
<tbody><br />
<tr>
<td>
<p>This is the first line in the table</p>
</td>
</tr>
<tr>
<td>This is the second line in the table</td>
</tr>
</tbody><br />
</table>
<p>In the original HTML code there is no extra line breaks around this table, but when displayed in Drupal the extra line breaks appear. </p>
Note the tbody tag has been appended with BR tag.
While this is a minor issue, it does cause incorrect display of content on my site, and I would hope it was a minor error in the display scripting. To display these tables I am using the Full HTML filter.
I have had a try to find this interpreter in the source code, but I have not been able to determine why this is happening. As 4.7.0 has gone to release candidate, I think this display issue is worth addressing as it appears to be a bug.
Please verify this behaviour by creating some content with a table in it and view the resulting page. If this error cannot be reproduced, then I will need to find out what is different in my Drupal system.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | filter.module_23.patch | 1.77 KB | tenrapid |
| tbody error.JPG | 16.82 KB | Kieg Khan |
Comments
Comment #1
markus_petrux commentedRemoving the "line break converter" filter from the "Full HTML" input format?
Comment #2
Kieg Khan commentedHello,
Something so easy, but I missed it. That did the trick.
Thanks.
Comment #3
tenrapid commentedHere is a patch that adds thead, tfoot and tbody to the recognized tags in the line break converter.
With this you don't have to disable the 'line break converter'.
Comment #4
tenrapid commentedstatus ...
Comment #5
steph commentedHum, strange. The code seems fine, but it doesn't seem to work :-(. I'll try more.
Comment #6
tenrapid commentedDid you clear the cache table?
Comment #7
steph commentedThanks.
Code works fine :-)
Comment #8
Kieg Khan commentedHello,
I had made these changes to my Drupal install prior to this patch coming out and prior to posting re-posting, but it did not seem to work. I will try again and clear the cache. To help speed this up, what is the quickest, easiest way to clear the cache?
Thanks.
Comment #9
Steven commentedHas already been fixed by a more generic commit.
Comment #10
(not verified) commented