-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URI rewriter thinks protocol agnostic URIs like //fonts.googleapis.com are internal #23
Comments
Yes, excellent. I ran into this issue myself and had to force the protocol to be added each time. It shouldn't be too difficult to fix, and from looking at the code I'm not sure why this is happening. I think the problem is happening here: $has_host = (bool) parse_url( $src, PHP_URL_HOST );
if ( ! $has_host ) {
$src = 'http://' . $host_domain . $src;
} However, it seems that
Oh, I see what the problem is. Looking at the parse_url docs:
So to be compatible with PHP<5.4.7, we need to make the $has_host = ( (bool) parse_url( $src, PHP_URL_HOST ) || strpos( $src, '//' ) === 0 ) |
I'm going to test this approach |
It appears is_self_hosted_src() also requires help. |
Adding the same
in front of existing is_self_hosted_src() logic seems to stop the plugin from coughing blood. |
Since WPEngine is known to lag behind time with their 5.3 thing, I'm going to try to address this with a pull request. |
This is crucial, because Firefox 23 actively blocks mixed content, leading to decidedly bad UX.
Try enqueueing something like "//fonts.googleapis.com/css?family=Lato:300,400|Open+Sans:300".
Dep. Minification admin panel will be filled with errors "Request for http://domain.com//fonts.googleapis.com/css?family=Lato:300,400 returned with HTTP 404 Not Found Try again"
The text was updated successfully, but these errors were encountered: