[wp-trac] [WordPress Trac] #33984: Wp_Query on tag & category based posts not getting when use + sign.
WordPress Trac
noreply at wordpress.org
Thu Sep 24 07:20:30 UTC 2015
#33984: Wp_Query on tag & category based posts not getting when use + sign.
--------------------------+------------------------------
Reporter: ravipatel | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Query | Version: 2.2.1
Severity: normal | Resolution: wontfix
Keywords: | Focuses: template
--------------------------+------------------------------
Changes (by Clorith):
* status: new => closed
* focuses: docs, template, performance => template
* resolution: => wontfix
* version: 4.3.1 => 2.2.1
Comment:
It seems that since we run `parse_str` when the value is submitted as a
string (as opposed to an array), the `+` sign is omitted as a space, using
the URL Encoded variant of it `%2B` produces the expected result, as does
providing the WP_Query arguments as an array `new WP_Query( array(
'category_name' => 'facebook+uncategorized' ) );`
Since this is the behavior of `parse_str`, a native PHP function, I'm
going to suggest this isn't something we can (or should be) messing with
as it might break expected backwards compatibility for other existing
implementations
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33984#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list