Forums

Contact Form 7
Filter html ? (6 posts)

  1. rwilki
    Member
    Posted 4 months ago #

    Great plugin. I've used it for a while. Is there a way to hook into the kses filter or have some other filter that strips html in the fields? Obviously captcha helps eliminate some spam, but I don't want people manually throwing links and scripts into the fields.

    http://wordpress.org/extend/plugins/contact-form-7/

  2. Takayuki Miyoshi
    Member
    Posted 4 months ago #

    You can use wpcf7_mail_tag_replaced filter hook in includes/classes.php for such purposes.

  3. rwilki
    Member
    Posted 4 months ago #

    Thanks Takauki I think I see that filter in the file already

    Line 659

    $replaced = apply_filters( 'wpcf7_mail_tag_replaced', $replaced,

    So, I have no idea where your other code goes...

  4. rwilki
    Member
    Posted 4 months ago #

    Oh do you mean replacing that with the KSES filter?

  5. Takayuki Miyoshi
    Member
    Posted 4 months ago #

    ? No, make your own function in somewhere you like, and hook it into the filter of wpcf7_mail_tag_replaced.

  6. rwilki
    Member
    Posted 4 months ago #

    Still don't understand. Thanks anyway.

Reply

You must log in to post.

About this Plugin

About this Topic