Changeset 8237

Show
Ignore:
Timestamp:
07/02/08 15:26:51 (2 months ago)
Author:
ryan
Message:

Don't match images with tags in them. Props noel. see #7220

Files:

Legend:

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

    r8235 r8237  
    116116 
    117117// Ajax Requests 
    118 $title = wp_specialchars(stripslashes($_GET['t'])); 
     118$title = wp_specialchars(aposfix(stripslashes($_GET['t']))); 
    119119 
    120120$selection = str_replace("\n", "<br />", aposfix( stripslashes($_GET['s']) ) ); 
     
    179179if($_REQUEST['ajax'] == 'photo_images') { 
    180180    function get_images_from_uri($uri) { 
    181         if(preg_match('/\.(jpg|png|gif)/', $uri) && !strpos($uri,'blogger.com'))  
     181        if(preg_match('/\.(jpg|jpe|jpeg|png|gif)/', $uri) && !strpos($uri,'blogger.com'))  
    182182            return "'".$uri."'"; 
    183183 
     
    187187        $host = parse_url($uri); 
    188188         
    189         $pattern = '/<img ([^>]*)src=(\"|\')(.+?)(\2)([^>\/]*)\/*>/is'; 
     189        $pattern = '/<img ([^>]*)src=(\"|\')([^<>]+?\.(png|jpeg|jpg|jpe|gif))(\2)([^>\/]*)\/*>/is'; 
    190190        preg_match_all($pattern, $content, $matches); 
    191191