Forums

disable html in write/post? (5 posts)

  1. nhant
    Member
    Posted 4 years ago #

    Is there anyway I can disable html in write/post?

    thanks.

  2. BubsatSchool
    Member
    Posted 4 years ago #

    Are you talking about inside the comments?

  3. nhant
    Member
    Posted 4 years ago #

    both, when someone post news/thread, and someone post the comments.

    they allow html .... anyway I can disable it?

  4. NuclearMoose
    Member
    Posted 4 years ago #

  5. mdawaffe
    Member
    Posted 4 years ago #

    For posts:
    Follow the instructions found on NuclearMoose's link and then create a file called my-hacks.php in your WordPress directory and put the following code into it.

    <?php
    add_filter('format_to_post','wp_filter_kses');
    ?>

    Make sure it is only those three lines. You will then need to enable "legacy my-hacks.php support" by checking the checkbox near the bottom of Options -> Miscellaneous.

    Note: this method allows the same set of HTML tags for both comments and posts. If you want different tags available for posts than for comments, well... it's significantly harder.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.