How do I stop people from posting HTML in comments? PDF Print Email

Acceptance of HTML tags in the comments field is managed in the file kses.php, located in the wp-includes folder.

Open this file in a text editor, and locate the list of HTML tags near the top of the file. Each HTML tag is listed on a separate line, in the construction of a PHP array of allowed tags. Lines which begin with // are commented-out, or disabled, so lines which begin with // designate HTML tags that are not allowed in comments.

To stop people from posting HTML in comments, edit your kses.php file as desired to allow or disallow specific HTML tags in comments, by adding // to the very beginning of the appropriate lines of the list. To exclude all HTML tags, comment out all lines which allow HTML tags. Be sure to save your file when done.

Note that while you could simply delete the lines instead of commentng them out, by adding // at the start of the line you achieve the same result, while preserving the list of tags for possible re-enabling at a later date.

 

New Joomla Templates

  1. Social ConnectedSocial ConnectedName: Social ConnectedDescription: Social Connected is a new professional, easy to use Joomla template released by the Joomladesigns team which includes custom CSS style layouts for the Jomsocial and K2 Extensions. The Social Connected template includes the following features Three Jooml ...Owner: JoomlaDesignsTags: Computers, Communications, Business, Architecture
  2. ExtendExtendName: ExtendDescription: Extend is a professional easy to use Joomla template released by the Joomladesigns Team. The new Extend template supports the following features Includes Four different Joomla Templates Built-in colour picker to customize the template colour scheme Bui ...Owner: JoomlaDesignsTags: Business, Beauty, Architecture
  3. NgineNgineName: NgineDescription: Ngine is a new professional Joomla template from Joomladesigns.co.uk which supports a wide range of features including Five built-in Joomla templates Slide show Slide pop up boxes K2 CSS styles RTL support Six built in font styles Lots of module posi ...Owner: JoomlaDesignsTags: Software, Portal, News, Games
  4. Simply City 2Simply City 2Name: Simply City 2Description: Simply City is a professional, fast loading Joomla template which is easy to use and includes a wide range of features. The web design also supports CSS styles for the popular K2 extension. The Joomla template includes the following features 3 multi col ...Owner: JoomlaDesignsTags: Computers, Communications, Business
  5. Simply CitySimply CityName: Simply CityDescription: Simply City is a professional, fast loading Joomla template which is easy to use and includes a wide range of features. The web design also supports CSS styles for the popular K2 extension. The Joomla template includes the following features 3 different ...Owner: JoomlaDesignsTags: Electronics, Computers, Communications, Business
  6. Show more...

Search Directory

Explore Directory

Top Joomla Design Teams