[wp-trac] Re: [WordPress Trac] #4785: wp_nonce_url and &
WordPress Trac
wp-trac at lists.automattic.com
Wed Mar 19 16:14:20 GMT 2008
#4785: wp_nonce_url and &
----------------------------+-----------------------------------------------
Reporter: DD32 | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone: 2.5
Component: Administration | Version:
Severity: normal | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by mtekk):
W3C spec states that & should be used in place of & in HTML and URLs.
&amp& should result in &amp& which isn't correct. From
the code/output you posted only the first & gets messed up. On change
set [7396] the following code worked:
{{{
$template = "foo";
$stylesheet = "bar";
$activate_link =
wp_nonce_url("themes.php?action=activate&template=$template&stylesheet=$stylesheet",
'switch-theme_' . $template);
echo $activate_link;
}}}
It echoed:
{{{
themes.php?action=activate&template=foo&stylesheet=bar&_wpnonce=c0bc0e7748
}}}
which is what was expected, no messed up ampersands.
--
Ticket URL: <http://trac.wordpress.org/ticket/4785#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list