Opened 14 years ago
Closed 14 years ago
#18336 closed enhancement (duplicate)
Properly detect scheme-less URL's in wp_enqueue_script
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2.1 |
Component: | General | Keywords: | has-patch |
Focuses: | Cc: |
Description
We should detect script URL's with leading //
and load either HTTP or HTTPS depending on the requesting page. This would more accurately reflect the behavior of the src
parameter of the default script
tag in HTML.
Several third party scripts use this format to load securely only when required.
There's no reason for a relative path to start with //
so this should not break any pre-existing use cases.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
It sounds like there's no downside to this.
wp_enqueue_script
should reflect browser behavior, especially since we encourage its use as a best practice.