Open px-progers opened 9 years ago
Thanks for reporting. This was done to make sure the source is valid for Minify, but I guess we need a better method.
May I suggest:
$src = preg_replace('#(^|/)\./#', '/', $src);
Also, Minify is sanitizing paths via realpath() anyway (in Controller/Files.php), so I'm not quite sure why this is necessary.
I'm running up against an issue where minification does not work for plugins who register styles with "../" in their path.
One plugin in particular that does this, is Ultimate VC Addons. The enqueue/register functions look like:
This shows up in the bwp enqueued styles list as:
Which causes the request to look like
Resulting in the minification error:
I have traced this down to the string replace function in
class-bwp-minify.php:2679
:Commenting out this line resolves the issue, and minifies the script as desired with no error.
Resolves: https://wordpress.org/support/topic/urls-with-parent-directory-references-break https://wordpress.org/support/topic/plugin-breaks-link-path?replies=1#post-8259533