diff options
-rw-r--r-- | inc/confutils.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 8133dc209..bf1791e76 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -147,8 +147,9 @@ function confToHash($file,$lower=false) { if ( !$lines ) return $conf; foreach ( $lines as $line ) { - //ignore comments - $line = preg_replace('/(?<!&)#.*$/','',$line); + //ignore comments (except escaped ones) + $line = preg_replace('/(?<![&\\\\])#.*$/','',$line); + $line = str_replace('\\#','#',$line); $line = trim($line); if(empty($line)) continue; $line = preg_split('/\s+/',$line,2); |