Sep
03

How To Disable HTML Comment In WordPress?

Hi,

To prevent web user from using HTML Tags in comments or block particular HTML elements, follow these steps:

1. In the folder wp-includes find the file kses.php and open it.
2. Find the text $allowedtags. It is followed by a list of the HTML elements allowed in comments.
3. To prevent a particular HTML element from being used, comment out the line for that element. To comment out a line, type // at the start of the line (some elements will probably be commented out already).
4. If you never want any HTML in comments at all, you can delete the whole function — from if (!CUSTOM_TAGS) to the next }.

Thanks,

Shane G.

Popularity: 1%

Related posts:
  1. Database Query to Enable/Disable Comment Option For WordPress Blog Hi, We can enable/disable comment option from database also. For...
  2. Rich HTML Editor Rich editing, also called WYSIWYG for What You See Is...
  3. Plugins: Comment Sorter With Comment Sorter, readers can disable Trackbacks and also decide...
  4. How to manage number of links allowed in a comment? You can hold a comment if it contains more than...
  5. WordPress MU- How to allow only registered users to comment? If you want to limit comment posting to those registered...

Leave a Reply

You must be logged in to post a comment.