Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#19059 closed defect (bug) (invalid)

Shortcodes starting with "embed_" doesn't always get called

Reported by: belx Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: Cc:


WP_Embed unregisters all filters before it runs, and because of how the shortcode regex is written,


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)

#1 @belx
7 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review deleted

#3 @SergeyBiryukov
7 years ago

I've just tested a sample function hooked to embed_page shortcode in 3.3-beta2-19067, and it seems to work.

Note: See TracTickets for help on using tickets.