WordPress.org

Make WordPress Core

Ticket #3757: 3757.diff

File 3757.diff, 766 bytes (added by mdawaffe, 7 years ago)
  • admin-functions.php

     
    139139 
    140140        $post = & get_post( $post_ID, ARRAY_A ); 
    141141 
    142         $search = "#<a[^>]+rel=('|\" )[^'\"]*attachment[^>]*>#ie"; 
     142        $search = "#<a[^>]+rel=('|\")[^'\"]*attachment[^>]*>#ie"; 
    143143 
    144144        // See if we have any rel="attachment" links 
    145145        if ( 0 == preg_match_all( $search, $post['post_content'], $anchor_matches, PREG_PATTERN_ORDER ) ) 
    146146                return; 
    147147 
    148148        $i = 0; 
    149         $search = "#[\s]+rel=(\"|' )(.*? )wp-att-(\d+ )\\1#i"; 
     149        $search = "#[\s]+rel=(\"|')(.*?)wp-att-(\d+)\\1#i"; 
    150150        foreach ( $anchor_matches[0] as $anchor ) { 
    151151                if ( 0 == preg_match( $search, $anchor, $id_matches ) ) 
    152152                        continue;