[wp-trac] [WordPress Trac] #35022: WP allows Unicode 0x00a0 spaces in editor but shortcode parser can't handle them
WordPress Trac
noreply at wordpress.org
Thu Mar 17 20:44:26 UTC 2016
#35022: WP allows Unicode 0x00a0 spaces in editor but shortcode parser can't handle
them
--------------------------+-----------------------------
Reporter: steevithak | Owner:
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: Future Release
Component: Shortcodes | Version: 4.4
Severity: normal | Resolution:
Keywords: needs-patch | Focuses:
--------------------------+-----------------------------
Comment (by steevithak):
Great, this just got more complicated. I found the problem causing the
mis-parsing of the first attribute following a shortcode with a non-
breaking space (the problem @boonebgorges refers to in comment:3). It
looks like some other part of Wordpress (not shortcodes.php) is unable to
identify the shortcodes as shortcodes, so it's doing some sort conversion
of quote characters into fancy Unicode quote characters. So instead of
[shortcode foo="1,2,3"], it gets corrupted into [shortcode foo=”1,2,3″].
Once that happens, the regexes in shortcodes.php mis-parse the parameters
list in a way that causes at least the first one to be lost. Even with
code added in shortcodes.php to remove the non-breaking space within the
shortcode, it's still broken because of the quotes. I don't know where in
WP the quote-mangling code might be found, so the best I can think of is
to modify the shortcode parser to handle Unicode as well as ASCII quote
characters. Any other ideas?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35022#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list