prabhuish / webutilities

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

Recursion loop if duplicate url() images on same line and fingerprinting disabled #54

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you disable fingerprinting (as we do because we use the default servlet for 
images), and you have multiple image filenames on the same line in the CSS (a 
pre-minified library, or image sprites), JSCSSMergeServlet gets stuck in a 
recursion loop.

To reproduce, just use a css file with multiple url(file1.jpg) url(file1.jpg) 
on the same line.  It seems that when "fingerprinting" is enabled, it bypasses 
the problem, but we can't always use that.
Here's an example file: 
https://cdnjs.cloudflare.com/ajax/libs/chosen/1.1.0/chosen.min.css

I've replaced the processCSSLine method in 0.0.7 to handle this, feel free to 
use it if you want: http://pastebin.com/Zb7k7nFS

Original issue reported on code.google.com by inta...@gmail.com on 20 Aug 2014 at 9:07

GoogleCodeExporter commented 9 years ago
Thanks for the details about this problem and also the possible fix. I would 
check it out and merge the same in trunk for version 0.0.8.

Original comment by rr.patil...@gmail.com on 21 Aug 2014 at 4:01

GoogleCodeExporter commented 9 years ago
https://github.com/rpatil26/webutilities/commit/e4d2d9a1470175eec8cf4605e84afe9c
6adceac5

Original comment by rr.patil...@gmail.com on 4 Aug 2015 at 9:41