From 4d1313bffc2bf3c4c7f67a80aec835570b733670 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 26 Jun 2014 02:13:16 +0000 Subject: [PATCH] In `kses.php`, ensure that `$allowedposttags`, `$allowedtags`, and `$allowedentitynames` are added to the global namespace. Props Jaza613. Fixes #28582. git-svn-id: https://develop.svn.wordpress.org/trunk@28845 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/kses.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/kses.php b/src/wp-includes/kses.php index 9d8d6fed19..1389be152f 100644 --- a/src/wp-includes/kses.php +++ b/src/wp-includes/kses.php @@ -44,6 +44,10 @@ 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; + if ( ! CUSTOM_TAGS ) { /** * Kses global for default allowable HTML tags.