Filter out classes and iframes from text area

Support MB Frontend Submission Filter out classes and iframes from text area

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #32999
    shmaltzshmaltz
    Participant

    When a user pastes data into my frontend forms wysiwyg field, very often it comes along with many divs, iframes, inline styles and classes. The big problem with this is that it ruins the styling of the website.

    Is there a way to only allow let's say

      ,

        , <h1-h6>, <p> and tags?
    #33009
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The field wysiwyg use the WP function wp_kses_post() to sanitize the input value. You can create your own function callback to sanitize the user input. Please read more on the documentation https://docs.metabox.io/sanitization/

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.