Unexpected wpautop results
-
I have a website with wpautop disabled for WPCF7 forms and enabled for their emails, because some forms on the website have emails which need wpautop for their correct presentation. Some other forms have an email that doesn’t need wpautop. I think that this should not be a problem if these are full-html body-content emails (with in the editor the option “Use html content type” enabled), right?
However, that is not the case. For example, suppose the email content contains a table with a cell
<td>[your_name]</td>. When I process the email content with the WordPress function wpautop, outside the WPCF7 plugin,, I get the same text, albeit split over three lines: opening tag, cell content, closing tag:<td>[your_name]</td>
That is perfectly all right.The email produced by WPCF7, however, contains (when I put everything back on one line):
<td><p>[your_name]</p></td>. As a consequence, the cell content is presented in the email received with paragraph styling, resulting in 32px margin between the table rows.Is there a way to prevent this, other than adding a
<style>element to the email content to (in this case) reset the<p>styling? Or is there a way to set the email wpautop on/off specific for each form? I checked$_POSTin awpcf7_autop_or_notfilter function, but I didn’t find the information for which form it was going to send an email.Thank you in advance for your help!
You must be logged in to reply to this topic.