Wordpress editor not creating <p></p> tags properly in tables

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
pb/p
pc/td
/tr
/tbody
/table
pa/p
pb/p
pc/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?

Topic table text html-editor html Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.