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?