[wp-trac] [WordPress Trac] #30123: Custom Mime Type filter problem in upload.php list view
WordPress Trac
noreply at wordpress.org
Wed Dec 31 17:22:25 UTC 2014
#30123: Custom Mime Type filter problem in upload.php list view
--------------------------+-----------------------------
Reporter: csschris | Owner: wonderboymusic
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.1
Component: Media | Version: 4.0
Severity: normal | Resolution: fixed
Keywords: has-patch | Focuses: administration
--------------------------+-----------------------------
Comment (by birgire):
@mdgl that's interesting.
To handle a comma sepereated list of mime types, like
{{{
application/x-pdf, application/pdf
}}}
I think it would be logical to extend {{{sanitize_mime_type}}} to support
this.
For example by adding a single comma (,) into the {{{preg_replace}}} part
of that function.
So instead of this line of the {{{sanitize_mime_type()}}} function:
{{{
$sani_mime_type = preg_replace( '/[^-+*.a-zA-Z0-9\/]/', '', $mime_type );
}}}
we could instead use this:
{{{
$sani_mime_type = preg_replace( '/[^-+*.,a-zA-Z0-9\/]/', '', $mime_type );
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30123#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list