How to disable esc_html & wptexturize on certain form-input?
-
Hi. First of all, thank You for such a great plugin.
I have a jquery-calculator and a Contact Form on the same page. My goal is to send the result of calculation (html-table with data) via Contact Form. So, I created hidden input and with the help of jquery filled it with my data. Everything is fine but the plugin encoded HTML-entities, so, in result-mail I have no html-table (just plain text: <table><tbody><tr>…).As I understand, this is the result of work of two functions: esc_html & wptexturize. Is there a way to disable esc_html & wptexturize on certain form-input (or at all)?
A found this code, but is it actual now?
add_filter( 'wpcf7_mail_tag_replaced', 'remove_texturize_from_wmtr', 10, 2 ); function remove_texturize_from_wmtr( $replaced, $submitted ) { if ( is_array( $submitted ) ) $replaced = join( ', ', $submitted ); else $replaced = $submitted; return strip_tags( $replaced ); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to disable esc_html & wptexturize on certain form-input?’ is closed to new replies.