meenie / munee

Munee: Standalone PHP 5.3 Asset Optimisation & Manipulation
https://munee.herokuapp.com/
MIT License
833 stars 92 forks source link

CSS background relative path problem 'images/img.gif' #27

Closed dfb243fda closed 11 years ago

dfb243fda commented 11 years ago

I use some libraries (for example "jquery easy ui") that have relative paths in css without "../" For example: background: url("images/tree_arrows.gif") or (./images/tree_arrows.gif). There is "images" directory in directory with css. Your library does not change this paths and after concatenating multiple styles into one request they does not work.

meenie commented 11 years ago

Hi Again,

Okay, that should be an easy change I think. Using the same code that changes ../images/img.gif to an absolute path should be able to change images/img.gif and ./images/img.gif as well. Just need to tweak the RegEx.

Thanks for the report!

Cheers, cody

archergod commented 11 years ago

I just want to vote for this.

meenie commented 11 years ago

Hi @archergod and @dfb243fda,

I'll be putting in a fix for this weekend. Sorry for the long wait.

Cheers, cody

archergod commented 11 years ago

as in seperate thread, I think your library shouldn't change path, as they spoil wordpress installation and few other of mine when site is been transfer or used from sub folder.

meenie commented 11 years ago

I replied to you in another thread. But the issue is if you combine a lot of files into one request, then the relative paths stop working properly in most cases. They need to be absolute paths to the images and/or fonts so that they can still be found.

meenie commented 11 years ago

@archergod and @dfb243fda

Sorry it took so long, the fix is now in place.