WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. myersbam
    Member
    Posted 1 year 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 1 year 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 1 year ago #

    perfect. thanks so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.