* kses 0.2.2 - HTML/XHTML filter that only allows some elements and attributes
* Copyright (C) 2002, 2003, 2005 Ulf Harnhammar
* This program is free software and open source software; you can redistribute
* it and/or modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
* http://www.gnu.org/licenses/gpl.html
* [kses strips evil scripts!]
* Added wp_ prefix to avoid conflicts with existing kses users
* @copyright (C) 2002, 2003, 2005
* @author Ulf Harnhammar <http://advogato.org/person/metaur/>
* Specifies the default allowable HTML tags.
* Using `CUSTOM_TAGS` is not recommended and should be considered deprecated. The
* {@see 'wp_kses_allowed_html'} filter is more powerful and supplies context.
* @see wp_kses_allowed_html()
* @var array[]|false Array of default allowable HTML tags, or false to use the defaults.
if ( ! defined( 'CUSTOM_TAGS' ) ) {
define( 'CUSTOM_TAGS', false );
// Ensure that these variables are added to the global namespace
// (e.g. if using namespaces / autoload in the current PHP environment).
global $allowedposttags, $allowedtags, $allowedentitynames, $allowedxmlentitynames;
* KSES global for default allowable HTML tags.
* Can be overridden with the `CUSTOM_TAGS` constant.
* @var array[] $allowedposttags Array of default allowable HTML tags.
$allowedposttags = array(
* @var array[] $allowedtags Array of KSES allowed HTML elements.
* @var string[] $allowedentitynames Array of KSES allowed HTML entitity names.
$allowedentitynames = array(