• Hi,

    We have created a plugin using hooks and filters from Contact form 7 to change the success message displayed after form has been submitted. Using the ‘wpcf7_before_send_mail’ hook, we assigned replaced the content of the ‘message_sent_ok’ value from the messages array (i.e. $messages [‘mail_sent_ok’] = $output).

    The output is a string composed of HTML tags and text. We have found out that the HTML tags are being stripped off and the output is not displayed correctly. This was working before on CF7 4.3.1, but when updated to 4.4 now results to an error.

    The working version can be found here (WordPress 4.4.2, CF7 4.3.1): http://initials-inc.com/find-a-consultant/

    I have tried encoding HTML entities, but it is not working as desired, as decoding it before assigning to the variable still strips the characters out (WordPress 4.4.2, CF7 4.4): http://initials-inc.com/dsol/find-a-consultant/

    Can you guys give me any ideas on how to solve this?

    Thank you. I appreciate your help.

    https://wordpress.org/plugins/contact-form-7/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTML Characters stripped out on success message’ is closed to new replies.