Remove HTML Tags

Support General Remove HTML Tags

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #34349
    dwayne@theolivermediagroup.com[email protected]
    Participant

    Hello,
    Im using a form on my site to create a post. Im pulling the Post Content field so it showing the edit like it does with a regular post - https://cln.sh/vZYINx

    However, when I save the post and go over to see the content in my wordpress post it has HTML tags wrapped around it https://cln.sh/ESDQOH.

    How can I set either the custom field or something so that it doesn't bring over the HTML tags, just the content.

    Thanks in advnce for your help

    #34386
    Long NguyenLong Nguyen
    Moderator

    Hi,

    For the field WYSIWYG, you can set the setting raw to true to prevent data from being passed through wpautop() on save. Or use custom sanitization to remove all HTML tags.

    Read more on the documentation
    https://docs.metabox.io/fields/wysiwyg/#settings
    https://docs.metabox.io/sanitization/

    #45159
    Saul CozensSaul Cozens
    Participant

    I'm struggling to get this to work for a post_content field on a frontend form. Is there a different way to remove tags for frontend forms?

    TIA

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