Changeset 736135
- Timestamp:
- 07/04/2013 01:17:44 PM (13 years ago)
- File:
-
- 1 edited
-
related-posts/tags/2.8/thumbnailer.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
related-posts/tags/2.8/thumbnailer.php
r735355 r736135 54 54 $tmp = download_url($url); 55 55 preg_match( '/[^\?]+\.(jpe?g|jpe|gif|png)\b/i', $url, $matches); 56 $file_array['name'] = sanitize_file_name( basename($matches[0]));56 $file_array['name'] = sanitize_file_name(urldecode(basename($matches[0]))); 57 57 58 58 $file_array['tmp_name'] = $tmp; … … 109 109 foreach ($html_tags as $html_tag) { 110 110 if (preg_match('#src=([\'"])(.+?)\1#is', $html_tag, $matches) && !empty($matches)) { 111 $url = urldecode($matches[2]);111 $url = $matches[2]; 112 112 113 113 $attachment_id = wp_rp_get_image_from_img_tag($post->ID, $url, $html_tag); … … 352 352 if ( empty( $tag ) ) 353 353 return; 354 return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/ >)', tag_escape( $tag ) );354 return sprintf( '<%1$s[^<]*(?:>[\s\S]*<\/%1$s>|\s*\/?>)', tag_escape( $tag ) ); // Added the last ? 355 355 } 356 356
Note: See TracChangeset
for help on using the changeset viewer.