[wp-trac] [WordPress Trac] #19059: Shortcodes starting with "embed_" doesn't always get called
WordPress Trac
wp-trac at lists.automattic.com
Wed Oct 26 14:44:20 UTC 2011
#19059: Shortcodes starting with "embed_" doesn't always get called
--------------------------+-----------------------------
Reporter: belx | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Plugins | Version:
Severity: normal | Keywords:
--------------------------+-----------------------------
WP_Embed unregisters all filters before it runs, and because of how the
shortcode regex is written,
{{{
(.?)\[('.$tagregexp.')\b(.*?)(?:(\/))?\](?:(.+?)\[\/\2\])?(.?)
}}}
where $tagregexp is defined as
{{{
$tagregexp = join( '|', array_map('preg_quote', $tagnames) );
}}}
embed_page is matched against /(embed)\b/, and removes the shortcode from
the content.
by changing \b to a list of characters that should be matched, shortcodes
staring with "embed_" will be working again.
{{{
[ \/\]] instead of \b should work
}}}
that is, use these characters as boundary: " ", "/", and "]"
The regexp is taken from an earlier version than trunk, but the \b (and
bug) is still present.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19059>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list