Make WordPress Core


Ignore:
Timestamp:
10/03/2009 07:14:44 AM (17 years ago)
Author:
azaozz
Message:

Press This fixes, props noel, see #10784

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/press-this.php

    r11982 r11994  
    193193         */
    194194        function get_images_from_uri($uri) {
    195             if( preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com') )
     195            if( preg_match('/\.(jpg|jpe|jpeg|png|gif)$/', $uri) && !strpos($uri,'blogger.com') )
    196196                return "'".html_entity_decode($uri)."'";
    197197            $content = wp_remote_fopen($uri);
     
    199199                return '';
    200200            $host = parse_url($uri);
    201             $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>\/]*)\/*>/is';
     201            $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif)[^<>\'\"]*)(\2)([^>]*)\/*>/is';
    202202            preg_match_all($pattern, $content, $matches);
    203203            if ( empty($matches[0]) )
Note: See TracChangeset for help on using the changeset viewer.