Skip to content
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

Issue with css compressor when using relative urls on some css files #83

Open
imarklee opened this issue Dec 4, 2017 · 0 comments
Open

Comments

@imarklee
Copy link

imarklee commented Dec 4, 2017

On some extensions like EasyBlog, it uses relative urls.

Before compression: http://take.ms/azG1w

After compression: http://take.ms/PZi0v

The problem lies on line 1122 in core/helix3.php

global $absolute_url;
$base = dirname($absolute_url);
while (preg_match('/^\.\.\//', $url))
{
	$base = dirname($base);
	$url  = substr($url, 3);
}
$url = $base . '/' . $url;

The $base is always / and this causes the end result to be //path/to/item . Because // also represents an URI, it thinks that path is a domain name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant