[wp-trac] [WordPress Trac] #20672: Mime-Type Matching Error With Certain Added Mime-Types
WordPress Trac
wp-trac at lists.automattic.com
Mon May 14 11:11:54 UTC 2012
#20672: Mime-Type Matching Error With Certain Added Mime-Types
--------------------------+------------------------------
Reporter: toneburst | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch |
--------------------------+------------------------------
Changes (by duck_):
* keywords: => has-patch
* version: 3.3.2 => 3.0
Comment:
The problem is that `wp_match_mime_types()` fails if
`$wildcard_mime_types` contains regular expression special characters like
"+".
The attached patch uses the technique from WP_oEmbed: replace "*" with a
non-special string, preg_quote(), replace the placeholder string with
"[-._a-z0-9]*".
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20672#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list