X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/c8946fda799b75451b0bee19b48736a13433a7e3..refs/tags/wordpress-3.1.4-scripts:/wp-includes/kses.php diff --git a/wp-includes/kses.php b/wp-includes/kses.php index 7ca692f5..aea7aa81 100644 --- a/wp-includes/kses.php +++ b/wp-includes/kses.php @@ -17,7 +17,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or visit * http://www.gnu.org/licenses/gpl.html - * + * * [kses strips evil scripts!] * * Added wp_ prefix to avoid conflicts with existing kses users @@ -28,6 +28,7 @@ * * @package External * @subpackage KSES + * */ /** @@ -553,8 +554,18 @@ function wp_kses_split($string, $allowed_html, $allowed_protocols) { global $pass_allowed_html, $pass_allowed_protocols; $pass_allowed_html = $allowed_html; $pass_allowed_protocols = $allowed_protocols; - return preg_replace_callback('%((|$))|(<[^>]*(>|$)|>))%', - create_function('$match', 'global $pass_allowed_html, $pass_allowed_protocols; return wp_kses_split2($match[1], $pass_allowed_html, $pass_allowed_protocols);'), $string); + return preg_replace_callback( '%((|$))|(<[^>]*(>|$)|>))%', '_wp_kses_split_callback', $string ); +} + +/** + * Callback for wp_kses_split. + * + * @since 3.1.0 + * @access private + */ +function _wp_kses_split_callback( $match ) { + global $pass_allowed_html, $pass_allowed_protocols; + return wp_kses_split2( $match[1], $pass_allowed_html, $pass_allowed_protocols ); } /**