Contact Form 7
Autop filter applied to Multline HTML = Big Mistake (2 posts)

  1. Alhadis
    Posted 6 years ago #

    After updating to version 2.3, I've noticed all my e-mails are being sent with double spacing: and WPCF7 doesn't appear to respect the WPCF7_AUTOP constant being set to FALSE in wp-config. As a matter of fact, there doesn't appear to be a means of overriding this behaviour *anywhere*.

    I currently have a client ready to sign off on a job, and this update has suddenly given me one more thing on my plate to try and remedy; the e-mail being sent to them is laid out like this:

    <strong>From:</strong> [firstname] [surname]<br />
    <strong>E-mail:</strong> [email]<br />
    <strong>Phone:</strong> [phone]<br />
    <strong>How did you hear about us?</strong> [referral]<br/>
    <strong>Message:</strong><br />
    [message]<br />

    However, when received in Gmail, it comes out looking something like this:



    1234 5678


    I humbly suggest providing a means of overriding this irritating behaviour - either by respecting the WPCF7_AUTOP constant, or by checking the "Additional Settings" value for a local per-form override. Either way, something needs to be done about this.

    EDIT: I managed to circumvent this plugin's behaviour by adding a filter to my theme's "functions.php" file; but I still found this to be a clumsy solution:

    add_filter("wpcf7_mail_tag_replaced", "suppress_wpcf7_filter");
    function suppress_wpcf7_filter($value, $sub = ""){
    	$out	=	!empty($sub) ? $sub : $value;
    	$out	=	strip_tags($out);
    	$out	=	wptexturize($out);
    	return $out;
  2. poiseandapple
    Posted 5 years ago #

    I realize I'm 3 months late on this, but have you tried modifying the wpautop function in wp-content/formatting.php?

    Try this

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Contact Form 7
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic