From c750cbbf5f9f5f8d4b83a0876fe70381bbdbcb56 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Sun, 16 Dec 2007 21:44:48 +0000 Subject: [PATCH] Allow numbers in content type to allow for types like 3gp. Fixes #5449. Hat tip: meledin, DD32. git-svn-id: https://develop.svn.wordpress.org/trunk@6393 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-app.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-app.php b/wp-app.php index b47ee21da5..2791ee7263 100644 --- a/wp-app.php +++ b/wp-app.php @@ -403,7 +403,7 @@ EOD; $slug = sanitize_file_name( $_SERVER['HTTP_TITLE'] ); elseif ( empty( $slug ) ) // just make a random name $slug = substr( md5( uniqid( microtime() ) ), 0, 7); - $ext = preg_replace( '|.*/([a-z]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); + $ext = preg_replace( '|.*/([a-z0-9]+)|', '$1', $_SERVER['CONTENT_TYPE'] ); $slug = "$slug.$ext"; $file = wp_upload_bits( $slug, NULL, $bits);