Return to Snippet

Revision: 80644
at March 23, 2020 17:25 by chrisaiv


Updated URL
https://www.chrisjmendez.com/2014/09/19/wordpress-disable-html-in-wordpress-comments/

Updated Code
https://www.chrisjmendez.com/2014/09/19/wordpress-disable-html-in-wordpress-comments/

Updated Description
https://www.chrisjmendez.com/2014/09/19/wordpress-disable-html-in-wordpress-comments/

Revision: 67413
at September 19, 2014 03:32 by chrisaiv


Initial Code
/** ******** ******** ******** ******** ******** ******** ******** ******** 
* TITLE:       Disable HTML in WordPress comments
* DESCRIPTION: Disallow HTML in WordPress comments, add this snippet to your functions.php file.
* 
* http://www.labnol.org/internet/wordpress-optimization-guide/3931/
*/
add_filter( 'pre_comment_content', 'wp_specialchars' );

Initial URL
http://www.labnol.org/internet/wordpress-optimization-guide/3931/

Initial Description
You might need to strip out HTML in comments and here's how.

Initial Title
Wordpress: Disable HTML in Wordpress comments

Initial Tags
wordpress

Initial Language
PHP