WordPress editor not creating

tags properly in tables

Question

WordPress isn’t creating paragraph tags properly for paragraphs in a table. For example, the following in the WordPress text editor:

<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 100%;">a

b

c</td>
</tr>
</tbody>
</table>
a

b

c

Results in this HTML:

<table style="border-collapse: collapse; width: 100%;">
<tbody>
<tr>
<td style="width: 100%;">a</p>
<p>b</p>
<p>c</td>
</tr>
</tbody>
</table>
<p>a</p>
<p>b</p>
<p>c</p>

There are HTML errors in the table with the paragraph p tags, but outside the table isn’t fine. Why is this the case and how can I solve it?

0
, , , dsdffds 4 years 2020-03-25T12:51:03-05:00 0 Answers 110 views 0

Leave an answer

Browse
Browse