[wp-trac] [WordPress Trac] #34939: Shortcode regex no longer matches [shortcode=XXX]

WordPress Trac noreply at wordpress.org
Mon Dec 21 21:08:13 UTC 2015


#34939: Shortcode regex no longer matches [shortcode=XXX]
-------------------------------------+--------------------------
 Reporter:  kraftbj                  |       Owner:  miqrogroove
     Type:  defect (bug)             |      Status:  assigned
 Priority:  normal                   |   Milestone:  4.4.1
Component:  Shortcodes               |     Version:  4.4
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+--------------------------

Comment (by Otto42):

 Replying to [comment:7 Ipstenu]:
 > I can confirm this is a weird non-space space.
 >
 > I copied the code to another product and it gave a proper error on it,
 saying there was an unreadable char between {{{mp4="link"}}} and
 {{{wbem="link"}}}
 >
 > In the editor, it was just a space.
 >
 > Well ain't that special?

 I believe that this falls into the realm of it used to work before because
 of the "happy accident".

 TinyMCE has a habit of converting spaces (0x20) into non-breaking spaces
 (0xa0). It's done this for quite a while. Reproducing it is easy: type in
 a number of spaces in a row. Every other one will become a non-breaking
 space (0xa0).

 The regular expression pointed out by @dd32 above does not recognize 0xa0
 as valid separators. Seems like either 0xa0 should be added as a possible
 character not allowed in an shortcode/attribute name in order to prevent
 this issue, or the expressions reconsidered entirely.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34939#comment:22>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list