diff --git a/lib/inliner.php b/lib/inliner.php index cfaeace..a3ef87b 100644 --- a/lib/inliner.php +++ b/lib/inliner.php @@ -61,7 +61,7 @@ function minifyJs($js) { //$js = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $js); // Remove line comments - $js = preg_replace('/\/\/[^\n]*/', '', $js); + $js = preg_replace('/\/\/(?![^\'"]*(\'|")[^\'"]*(\'|"))[^\n]*/', '', $js); // Remove newlines and tabs //$js = str_replace(array("\r\n", "\r", "\n", "\t"), '', $js);