#19059 closed defect (bug) (invalid)
Shortcodes starting with "embed_" doesn't always get called
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | |
| Component: | Plugins | Keywords: | |
| Focuses: | Cc: |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
I've just tested a sample function hooked to
embed_pageshortcode in 3.3-beta2-19067, and it seems to work.