broken protocol-relative url detection
-
Protocol relative URLs use
//
not://
. Adjusting this as in the diff below fixed compatibility with plugins using CDN for script includes (i.e. use-google-libraries and various caching plugins).Previously those scripts had to be explicitely deactivated through bwp-minify backend.
wp-content/plugins/bwp-minify/includes/class-bwp-minify.php @@ -554,7 +554,7 @@ if (!empty($page)) function is_local($src = '') { // Add support for protocol-relative urls - if (false === strpos($src, '://') && substr($src, 0, 1) != '/') { + if (false === strpos($src, '//') && substr($src, 0, 1) != '/') { $src = 'https://'. $src; } $url = @parse_url($src);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘broken protocol-relative url detection’ is closed to new replies.