Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#18336 closed enhancement (duplicate)

Properly detect scheme-less URL's in wp_enqueue_script

Reported by: evansolomon's profile evansolomon 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)

18336.diff (641 bytes) - added by evansolomon 14 years ago.

Download all attachments as: .zip

Change History (3)

@evansolomon
14 years ago

#1 @koopersmith
14 years ago

  • Milestone changed from Awaiting Review to 3.3

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.

#2 @SergeyBiryukov
14 years ago

  • Milestone 3.3 deleted
  • Resolution set to duplicate
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.