Make WordPress Core

Changeset 12206


Ignore:
Timestamp:
11/18/2009 08:12:05 AM (15 years ago)
Author:
markjaquith
Message:

Do not destroy characters surrounding shortcodes in strip_shortcodes(). fixes #10326

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/shortcodes.php

    r10810 r12206  
    176176    $tagregexp = join( '|', array_map('preg_quote', $tagnames) );
    177177
     178    // WARNING! Do not change this regex without changing do_shortcode_tag() and strip_shortcodes()
    178179    return '(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)';
    179180}
     
    290291    $pattern = get_shortcode_regex();
    291292
    292     return preg_replace('/'.$pattern.'/s', '', $content);
     293    return preg_replace('/'.$pattern.'/s', '$1$6', $content);
    293294}
    294295
Note: See TracChangeset for help on using the changeset viewer.