-function wp_kses_no_null($string) {
- $string = preg_replace('/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string);
- $string = preg_replace('/(\\\\0)+/', '', $string);
+function wp_kses_no_null( $string, $options = null ) {
+ if ( ! isset( $options['slash_zero'] ) ) {
+ $options = array( 'slash_zero' => 'remove' );
+ }
+
+ $string = preg_replace( '/[\x00-\x08\x0B\x0C\x0E-\x1F]/', '', $string );
+ if ( 'remove' == $options['slash_zero'] ) {
+ $string = preg_replace( '/\\\\+0+/', '', $string );
+ }