[wp-trac] Re: [WordPress Trac] #8553: preg_replace_callback in
do_shortcode returns empty for large posts
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 16 23:12:32 GMT 2009
#8553: preg_replace_callback in do_shortcode returns empty for large posts
---------------------------+------------------------------------------------
Reporter: AaronCampbell | Type: defect (bug)
Status: new | Priority: high
Milestone: 2.9 | Component: Shortcodes
Version: | Severity: normal
Keywords: needs-patch |
---------------------------+------------------------------------------------
Comment(by Brusdeylins):
Here my modified function in shortcodes.php:
{{{
function get_shortcode_regex() {
global $shortcode_tags;
$tagnames = array_keys($shortcode_tags);
$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
//return
'(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)';
return
'(.?)\[('.$tagregexp.')\b([^\]]*?)(\/)?\](?:(.+?)\[\/\2\])?(.?)';
}
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/8553#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list