WordPress.org

Forums

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

  1. myersbam
    Member
    Posted 2 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.

    http://wordpress.org/extend/plugins/user-submitted-posts/

  2. Jeff Starr
    Member
    Plugin Author

    Posted 2 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
    Member
    Posted 2 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

Tags

No tags yet.