Skip to content

Commit

Permalink
Replace with for textarea and info.
Browse files Browse the repository at this point in the history
  • Loading branch information
devinsays committed Aug 6, 2011
1 parent 17b718f commit 987c0b0
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions options-sanitize.php
Expand Up @@ -7,22 +7,16 @@
/* Textarea */

function of_sanitize_textarea($input) {
global $allowedtags;
$output = wp_kses( $input, $allowedtags);
global $allowedposttags;
$output = wp_kses( $input, $allowedposttags);
return $output;
}

add_filter( 'of_sanitize_textarea', 'of_sanitize_textarea' );

/* 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 */

Expand Down Expand Up @@ -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 ) {
Expand Down

0 comments on commit 987c0b0

Please sign in to comment.