[wp-hackers] wp_enqueue_script() and URLs with 2+ parameters
Matt Martz
mdmartz at sivel.net
Sat Feb 28 00:26:49 GMT 2009
On Fri, Feb 27, 2009 at 5:05 PM, Mike Schinkel
<mikeschinkel at newclarity.net> wrote:
> "Matt Martz" <mdmartz at sivel.net> wrote:
>> Exactly what I mentioned earlier. The browser will convert the
>> entity to the actual character before making the call. Whether
>> it be clicking a link or calling a js or css file.
>
> Not true, it was my *mail client* that did the conversion of the information in an email, not my browser.
>
>> If you copy and paste the url with the entity into the address
>> bar it will however not work.
>
> And therein lies the problem. The same happens when a URL is request via the browser from a <script> tag.
>
> -Mike Schinkel
> http://mikeschinkel.com/
Okay, I put together a quick plugin to prove to myself that either the
use of & does work or does not work. In short I found that it
*does* work.
I'll even provide my plugin code so that anyone else who wants can test it.
The code can be found at http://gist.github.com/71796.txt
Save this as a .php file and place in your plugins directory. Once
activated navigate to your blog and you should see a javascript alert
that either says 'IT WORKED!' or 'IT DIDN'T WORK!" followed by some
extra data. It won't do the alert in the admin as I figured it might
be annoying to try to deal with the alert while activating and
deactivating.
--
Matt Martz
matt at sivel.net
More information about the wp-hackers
mailing list