From e5cafda07c413096a4acbd71c4b4fbf34054a093 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Tue, 1 Aug 2006 00:30:08 +0200 Subject: fix in JS compressor This fixes a problem with escaped backslashes in single and double quote strings. darcs-hash:20060731223008-7ad00-ebae61a00115b7f32c12eb9355059a1ecf467cd3.gz --- lib/exe/js.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/exe/js.php b/lib/exe/js.php index 9854f1b45..e01ab7bf5 100644 --- a/lib/exe/js.php +++ b/lib/exe/js.php @@ -290,7 +290,7 @@ function js_compress($s){ if($ch == '"'){ $j = 1; while( $s{$i+$j} != '"' && ($i+$j < $len)){ - if( $s{$i+$j} == '\\' && $s{$i+$j+1} == '"' ){ + if( $s{$i+$j} == '\\' && ($s{$i+$j+1} == '"' || $s{$i+$j+1} == '\\') ){ $j += 2; }else{ $j += 1; @@ -305,7 +305,7 @@ function js_compress($s){ if($ch == "'"){ $j = 1; while( $s{$i+$j} != "'" && ($i+$j < $len)){ - if( $s{$i+$j} == '\\' && $s{$i+$j+1} == "'" ){ + if( $s{$i+$j} == '\\' && ($s{$i+$j+1} == "'" || $s{$i+$j+1} == '\\') ){ $j += 2; }else{ $j += 1; -- cgit v1.2.3