From 80640b5e25f249a01ea0b0f6f9b0c48ac7b64aa0 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 20 Jun 2011 20:05:57 +0000 Subject: [PATCH] Allow plus '+' character when sanitizing mime type. Props cyberhobo. fixes #17855 git-svn-id: https://develop.svn.wordpress.org/trunk@18324 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 e7cb21c1ce..15931380f5 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2907,7 +2907,7 @@ function capital_P_dangit( $text ) { * @return string Sanitized mime type */ function sanitize_mime_type( $mime_type ) { - $sani_mime_type = preg_replace( '/[^-*.a-zA-Z0-9\/]/', '', $mime_type ); + $sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type ); return apply_filters( 'sanitize_mime_type', $sani_mime_type, $mime_type ); }