kasparsd / minit

A WordPress plugin to combine CSS and Javascript files.
GNU General Public License v2.0
286 stars 46 forks source link

../ and everything after gets removed in CSS #23

Closed markoheijnen closed 10 years ago

markoheijnen commented 10 years ago

For a lot of themes and plugins it's quite common to have your CSS and fonts in different folders. With the current regex that breaks.

kasparsd commented 10 years ago

Marko, are you referring to this https://github.com/kasparsd/minit/blob/b1bdf36320063b142e1610ed26294cf9220db4b1/minit.php#L223

It tries to make all relative and local asset URLs into absolute URLs by prepending $object->base_url . dirname( $src ) to the relative component of the asset. I don't see how it would fail for assets in any local theme folder.

Do you have an example of the CSS rule that is failing?

kasparsd commented 10 years ago

It is also possible that kasparsd/minit/pull/22 introduced the problem.

thomasmb commented 10 years ago

Updated the regex to fix the issue introduced in kasparsd/minit/pull/22 with kasparsd/minit/pull/24

markoheijnen commented 10 years ago

That was fast and it did solve the issue.