Merge pull request #798 from pi-hole/fix/list-comments

Ignore commented lines in list files
This commit is contained in:
DL6ER
2018-08-02 12:20:55 +02:00
committed by GitHub
+2 -2
View File
@@ -38,9 +38,9 @@ function getListContent($listname) {
$rawList = file_get_contents(checkfile($basedir.$listname));
$list = explode("\n", $rawList);
// Get rid of empty lines
// Get rid of empty lines and comments
for($i = sizeof($list)-1; $i >= 0; $i--) {
if(strlen($list[$i]) < 1)
if(strlen($list[$i]) < 1 || $list[$i][0] === '#')
unset($list[$i]);
}