[wp-trac] [WordPress Trac] #17923: add_query_arg() should encode values
WordPress Trac
noreply at wordpress.org
Thu Oct 15 04:54:11 UTC 2015
#17923: add_query_arg() should encode values
--------------------------+-----------------------------
Reporter: Viper007Bond | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future Release
Component: General | Version: 3.2
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Changes (by Viper007Bond):
* status: closed => reopened
* resolution: wontfix =>
* milestone: => Future Release
Comment:
Escaping the output of `add_query_arg()` is completely unrelated to this
issue. :)
Here's a demo:
{{{
echo '<a href="' . esc_url( add_query_arg( 'message', 'Make sure you do A
& B!' ) ) . '">clicky</a>';
var_dump( $_GET );
}}}
Load that up and click the link. It doesn't work like you'd expect:
{{{
array (size=2)
'message' => string 'MakesureyoudoA' (length=14)
'B!' => string '' (length=0)
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17923#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list