[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
Wed Mar 16 20:26:37 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):
@chriscct7 @johnbillion I've grabbed the trunk source and started working
on this. Looking back at prior versions of WP, I'm a bit baffled by some
of the current code in shortcodes.php. Just a few version back, say in
4.2.2, the code is very elegant and compact with a single regex that
identifies shortcodes. That one regex in get_shortcode_regex() is loaded
by other functions in shortcodes.php that need to identify or parse
shortcodes. But in the latest shortcodes.php, there several different
methods being used to parse short codes. Some functions still use
get_shortcode_regex() but other functions now use their own, slightly
different regexes. (one of the functions already handles unicode non-
breaking spaces indirectly by replacing them with 0x20 spaces prior to
running the regex.) Where can I get more information on the rational
behind these changes? Is there a developer mailing list or forum thread
someone can point me to that might clue me in to why these changes were
made in recent versions? There must be some reason for using multiple
different methods of parsing shortcodes in different places and without
understanding why, I'm afraid I may break something else while fixing the
non-breaking space issue. :(
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35022#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list