till / cssmin

Automatically exported from code.google.com/p/cssmin
0 stars 0 forks source link

URL are not decoded with 'preserve-urls' #9

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Minify CSS containing an URL with 'preserve-urls' option

What is the expected output? What do you see instead?
Url is not preserved. Instead, it is encoded in bas64 twice.

What version of the product are you using? On what operating system?
r5

Please provide any additional information below.
Here is the bug:
<code>
if (in_array("preserve-urls", $options))
{
    // Decode url()
    $css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_encode_url", $css);
}
</code>

Should be:
<code>
if (in_array("preserve-urls", $options))
{
    // Decode url()
    $css = preg_replace_callback("/url\s*\((.*)\)/siU", "cssmin_decode_url", $css);
}
</code>

Otherwise nice work!

Original issue reported on code.google.com by hong...@gmail.com on 16 Jul 2010 at 10:49

GoogleCodeExporter commented 8 years ago
Fixed in v2.0.0.b1

Original comment by joe.scylla on 6 Aug 2010 at 1:06