Merge pull request #17999 from eileenmcnaughton/sql_cache
[civicrm-core.git] / CRM / Utils / JS.php
index 0b46737714168ed50ccaa1539029299af5570177..27e52d0d1ffb0c86acaaa11ecd4a949654563178 100644 (file)
@@ -109,7 +109,7 @@ class CRM_Utils_JS {
    * @return string
    */
   public static function stripComments($script) {
-    return preg_replace(":^\\s*//[^\n]+$:m", "", $script);
+    return preg_replace("#^\\s*//[^\n]*$(?:\r\n|\n)?#m", "", $script);
   }
 
   /**