Development

#9936 (AssetHelper _compute_public_path() function failed with protocol relative URL wihtout extension)

You must first sign up to be able to contribute.

Ticket #9936 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

AssetHelper _compute_public_path() function failed with protocol relative URL wihtout extension

Reported by: loops Assigned to: fabien
Priority: minor Milestone: 1.4.15
Component: helpers Version: 1.4.10
Keywords: Cc:
Qualification: Ready for core team

Description

I just notice that the _compute_public_path() function in AssetHelper? failed with protocol relative URL without extension.

A really easy test can be done using this code in any view.yml file:

javascripts:

  • //maps.google.com/maps/api/js?sensor=false&language=en

You will see that the unexpected ".js" extension is added to this protocol relative URL and provide a script tag to a 404 URL: //maps.google.com/maps/api/js.js?sensor=false&language=en

See attached patch to enable protocole relative URL without extension.

Thanks

Loops

Attachments

sf9936_AssetHelper.patch (409 bytes) - added by loops on 10/07/11 10:24:42.
Enable protocol relative URL wihtout extension

Change History

10/07/11 10:24:42 changed by loops

  • attachment sf9936_AssetHelper.patch added.

Enable protocol relative URL wihtout extension

10/07/11 10:26:47 changed by loops

Oups... The code to use should be:

  javascripts:
    - //maps.google.com/maps/api/js?sensor=false&language=en 

10/07/11 14:29:10 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [33121]) [1.4] fixed protocol relative URL in the asset helper (closes #9936)

10/07/11 14:29:34 changed by fabien

  • milestone set to 1.4.15.