Make WordPress Core

Changeset 4889


Ignore:
Timestamp:
02/16/2007 04:12:17 AM (18 years ago)
Author:
markjaquith
Message:

Fix fix_attachment_link() regex. Props mdawaffe. fixes #3757

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.1/wp-admin/admin-functions.php

    r4810 r4889  
    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
     
    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 ) )
Note: See TracChangeset for help on using the changeset viewer.