#9243 closed defect (bug) (invalid)
wp_enqueue_script shouldn't convert source URL ampersands to character entities
Reported by: | filosofo | Owned by: | ryan |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | General | Keywords: | wp_enqueue_script clean_url has-patch |
Focuses: | Cc: |
Description
As Mike Schinkel pointed out, when a script source URL has ampersands in it, they get converted to their character entities.
Instead, clean_url() should not use the default "display" argument.
Attachments (1)
Change History (5)
#3
@
16 years ago
- Milestone Unassigned deleted
- Resolution set to invalid
- Status changed from new to closed
- Version 2.8 deleted
sivel is right. His proof plugin shows that it works correctly, and it is invalid xhtml
I apologize for not verifying this myself.
Note: See
TracTickets for help on using
tickets.
I do not think this should be done. Not encoding the ampersands will break xhtml validation and I have tested that it does indeed works as expected while encoded.
From my email to wp-hackers:
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.