The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

User Submitted Posts
[resolved] disable html (3 posts)

  1. myersbam
    Posted 3 years ago #

    Is it possible to disable html code for user submissions?
    I have "Disable stylesheet" dialed in under the form style settings, but still able to use html code.
    Would like allow only text to be submitted through forms.

    Thanks for any help.


  2. Jeff Starr
    Plugin Author

    Posted 3 years ago #

    It's not possible by default, but if you want to edit "user-submitted-posts.php" around line 100, locate this line:

    $content = stripslashes($_POST['user-submitted-content']);

    ..and add this line just below it:

    $content = strip_tags($content);

    That uses PHP's strip_tags() to strip HTML and PHP tags from the submitted content. Other fields may need similar treatment, depending on your goals.

  3. myersbam
    Posted 3 years ago #

    perfect. thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • User Submitted Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.