Changeset 21219
- Timestamp:
- 07/05/2012 08:51:55 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/media.php
r21171 r21219 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; -
trunk/wp-admin/press-this.php
r21204 r21219 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); -
trunk/wp-includes/post.php
r21213 r21219 4037 4037 $ext = preg_match('/\.([^.]+)$/', $file, $matches) ? strtolower($matches[1]) : false; 4038 4038 4039 $image_exts = array( 'jpg', 'jpeg', 'gif', 'png');4039 $image_exts = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' ); 4040 4040 4041 4041 if ( 'image/' == substr($post->post_mime_type, 0, 6) || $ext && 'import' == $post->post_mime_type && in_array($ext, $image_exts) )
Note: See TracChangeset
for help on using the changeset viewer.