[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / compresseur / lib / csstidy / class.csstidy_print.php
index 5f4c2cd..762b26e 100644 (file)
@@ -200,6 +200,12 @@ class csstidy_print {
                                        $this->import[$i] = '"' . substr($this->import[$i], 4, -1) . '"';
                                        $this->parser->log('Optimised @import : Removed "url("', 'Information');
                                }
+                               else if (!preg_match('/^".+"$/',$this->import[$i])) {
+                                       // fixes a bug for @import ".." instead of the expected @import url("..")
+                                       // If it comes in due to @import ".." the "" will be missing and the output will become @import .. (which is an error)
+                                       $this->import[$i] = '"' . $this->import[$i] . '"';
+                               }
+
                                $output .= $template[0] . '@import ' . $template[5] . $this->import[$i] . $template[6] . $template[13];
                        }
                }