ericmckean / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Right parenthesis in a filename breaks CSS output #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
STOP! If your issue is with URI rewriting, read the wiki first:
http://code.google.com/p/minify/wiki/CommonProblems#URIs_are_re-
written_incorrectly_in_CSS_output
Please remove this message from the issue.

Minify version:
PHP version: 2.1.3

What steps will reproduce the problem?
1. Use brackets in a filename in a CSS declaration e.g. 
div.MultiBoxLoading 
{
    background: url('/images/multibox/ajax-loader(2).gif') no-repeat center;
}

Expected output:
Minified CSS

Actual output:
Broken minified CSS

Did any unit tests FAIL? (Please do not post the full list)
Not sure what this means, sorry. I have only just started using minifier

Please provide any additional information below. If this has to do with URI
rewriting, please include your DOCUMENT_ROOT, the

Original issue reported on code.google.com by weblator...@googlemail.com on 19 Feb 2010 at 3:47

GoogleCodeExporter commented 9 years ago
You're right that this is valid CSS content (it's a bug in our URL matching), 
but
URLs should always have "(", ")", and several other chars encoded as they were
declared "unsafe": http://tools.ietf.org/html/rfc1738#page-3

Hence, I'm leaning on "WontFix"-ing this unless the fix would be simple. This 
line
captures the url(...) bit:
http://code.google.com/p/minify/source/browse/tags/release_2.1.3/min/lib/Minify/
CSS/UriRewriter.php#79
But passes the inside bit (possibly containing quotes) here:
http://code.google.com/p/minify/source/browse/tags/release_2.1.3/min/lib/Minify/
CSS/UriRewriter.php#143

Original comment by mrclay....@gmail.com on 20 Feb 2010 at 7:39

GoogleCodeExporter commented 9 years ago
FYI: Oops RFC1738 doesn't say parenthesis are unsafe in URLs, in fact they're 
"special".

Original comment by mrclay....@gmail.com on 10 May 2010 at 7:48