From 4f3eab3de3c6e9fa5354ce01fb6c9178363840db Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 20 Oct 2009 18:52:37 +0000 Subject: [PATCH] Strip nulls git-svn-id: http://svn.automattic.com/wordpress/trunk@12072 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 69c5acede2..5ca9435fd1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -600,7 +600,7 @@ function remove_accents($string) { */ function sanitize_file_name( $filename ) { $filename_raw = $filename; - $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}"); + $special_chars = array("?", "[", "]", "/", "\\", "=", "<", ">", ":", ";", ",", "'", "\"", "&", "$", "#", "*", "(", ")", "|", "~", "`", "!", "{", "}", chr(0)); $special_chars = apply_filters('sanitize_file_name_chars', $special_chars, $filename_raw); $filename = str_replace($special_chars, '', $filename); $filename = preg_replace('/[\s-]+/', '-', $filename);