From 5c5b52fd17bf855ab64656790b39ff43450902c9 Mon Sep 17 00:00:00 2001
From: LarsDW223 <lars_paulsen@web.de>
Date: Wed, 15 Oct 2014 10:48:15 +0200
Subject: [PATCH] Fixed JavaScript compression. The compressor did not
 recognize a regular expression after a '&&' ot '||' operator. So it could
 happen that code had been cut off if the regular expression included '\//'
 (which was treated as a single line comment because of the regular expression
 not being recognized). Finally fixes #897.

---
 lib/exe/js.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/exe/js.php b/lib/exe/js.php
index 2ab78dfc3..545ba7b23 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -293,7 +293,7 @@ function js_compress($s){
     // E.g. '+ ++' may not be compressed to '+++' --> syntax error.
     $ops = "+-";
 
-    $regex_starters = array("(", "=", "[", "," , ":", "!");
+    $regex_starters = array("(", "=", "[", "," , ":", "!", "&", "|");
 
     $whitespaces_chars = array(" ", "\t", "\n", "\r", "\0", "\x0B");
 
-- 
GitLab