From 987c0b082d61f37ce887820835c74adfcf656dac Mon Sep 17 00:00:00 2001 From: Devin Price Date: Fri, 5 Aug 2011 22:28:33 -0500 Subject: [PATCH] Replace with for textarea and info. --- options-sanitize.php | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/options-sanitize.php b/options-sanitize.php index c5318fa..5dc4b78 100755 --- a/options-sanitize.php +++ b/options-sanitize.php @@ -7,8 +7,8 @@ /* Textarea */ function of_sanitize_textarea($input) { - global $allowedtags; - $output = wp_kses( $input, $allowedtags); + global $allowedposttags; + $output = wp_kses( $input, $allowedposttags); return $output; } @@ -16,13 +16,7 @@ function of_sanitize_textarea($input) { /* Info */ -function of_sanitize_allowedtags($input) { - global $allowedtags; - $output = wpautop(wp_kses( $input, $allowedtags)); - return $output; -} - -add_filter( 'of_sanitize_info', 'of_sanitize_allowedtags' ); +add_filter( 'of_sanitize_info', 'of_sanitize_allowedposttags' ); /* Select */ @@ -82,6 +76,27 @@ function of_sanitize_upload( $input ) { } add_filter( 'of_sanitize_upload', 'of_sanitize_upload' ); +/* Allowed Tags */ + +function of_sanitize_allowedtags($input) { + global $allowedtags; + $output = wpautop(wp_kses( $input, $allowedtags)); + return $output; +} + +add_filter( 'of_sanitize_info', 'of_sanitize_allowedtags' ); + +/* Allowed Post Tags */ + +function of_sanitize_allowedposttags($input) { + global $allowedposttags; + $output = wpautop(wp_kses( $input, $allowedposttags)); + return $output; +} + +add_filter( 'of_sanitize_info', 'of_sanitize_allowedposttags' ); + + /* Check that the key value sent is valid */ function of_sanitize_enum( $input, $option ) {