Ticket #16693: 16693.5.diff
| File 16693.5.diff, 1.7 KB (added by , 14 years ago) |
|---|
-
wp-includes/post.php
4033 4033 4034 4034 $ext = preg_match('/\.([^.]+)$/', $file, $matches) ? strtolower($matches[1]) : false; 4035 4035 4036 $image_exts = array( 'jpg', 'jpeg', 'gif', 'png');4036 $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ); 4037 4037 4038 4038 if ( 'image/' == substr($post->post_mime_type, 0, 6) || $ext && 'import' == $post->post_mime_type && in_array($ext, $image_exts) ) 4039 4039 return true; -
wp-admin/includes/media.php
599 599 600 600 // Set variables for storage 601 601 // fix file filename for query strings 602 preg_match( '/[^\?]+\.(jpg|JPG|jpe|JPE|jpeg|JPEG|gif|GIF|png|PNG)/', $file, $matches);602 preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $file, $matches ); 603 603 $file_array['name'] = basename($matches[0]); 604 604 $file_array['tmp_name'] = $tmp; 605 605 -
wp-admin/press-this.php
172 172 */ 173 173 function get_images_from_uri($uri) { 174 174 $uri = preg_replace('/\/#.+?$/','', $uri); 175 if ( preg_match( '/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )175 if ( preg_match( '/\.(jpe?g|jpe|gif|png)\b/i', $uri ) && !strpos( $uri, 'blogger.com' ) ) 176 176 return "'" . esc_attr( html_entity_decode($uri) ) . "'"; 177 177 $content = wp_remote_fopen($uri); 178 178 if ( false === $content )