Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37493 closed defect (bug) (worksforme)

shortcodes of the format [shortcode value] no longer recognized

Reported by: wayneallen's profile WayneAllen Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.5.3
Component: Shortcodes Keywords: reporter-feedback
Focuses: Cc:


At some point in the shortcode rewrite we lost a feature.

Previously a shortcode of the form [shortcode value] would work. As of 4.5.3 it doesn't (I didn't work backwards to see where it broke).

At line 213 in shortcodes.php the statement

preg_match_all( '@\[([^<>&/\[\]\x00-\x20=]++)@', $content, $matches );

This returns the array ['shortcode value'] rather than ['shortcode'] and therefore fails the test looking for known shortcodes.

Change History (3)

#1 @dd32
8 years ago

  • Keywords reporter-feedback added

This should work, as \x20 is the space character and the match cannot include it.

Is the space character actually a non-breaking space instead perhaps?

#2 @WayneAllen
8 years ago

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

As the author of the Postie plugin I have a little different workflow than typical.

Thanks for the pointer. Looks like gmail is encoding the space strangely. All other spaces are encoded normally, but spaces inside the shortcodes are encoded (quoted-printable) as =C2=A0 (non-breaking).

Clearly not a WP issue.

#3 @DrewAPicture
8 years ago

  • Milestone Awaiting Review deleted
  • Resolution changed from invalid to worksforme
Note: See TracTickets for help on using tickets.