Opened 15 years ago
Closed 15 years ago
#18336 closed enhancement (duplicate)
Properly detect scheme-less URL's in wp_enqueue_script
| Reported by: | evansolomon | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | General | Version: | 3.2.1 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
It sounds like there's no downside to this.
wp_enqueue_scriptshould reflect browser behavior, especially since we encourage its use as a best practice.