Make WordPress Core

Opened 6 years ago

Last modified 5 years ago

#34591 new defect (bug)

BugFix to WP_Scripts::do_item(), remove doubled "//" — at Initial Version

Reported by: jan.mazanek Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.3.1
Component: Script Loader Keywords: reporter-feedback needs-patch needs-unit-tests
Focuses: Cc:


Current code in do_item() of class.wp-script.php on line 172:

$src = $this->base_url . $src;

may produce duplicate slashes "", resulting in problems.

This might be fixed with code:

$src = $this->base_url . $src;


  • WP_Scripts contains: "public $base_url; Full URL with trailing slash" and
  • script-loader.php contains calls $scripts->add() with initial "/" in relative paths

Together this produces doubled slashes "". For example:

This makes W3TC include script in minified version, but not to remove it from the original HTML.

Including jQuery twice makes LayerSlider not to work.

Please, could you bugfix class.wp-script.php on line 172?

Thank you :-)

Change History (0)

Note: See TracTickets for help on using tickets.