Fixed bug with blacklist and whitelist.
This commit is contained in:
@@ -10,6 +10,12 @@ function contains(line, list) {
|
||||
var lines = list.split('\n');
|
||||
|
||||
for (var i = 0; i < lines.length; i ++) {
|
||||
|
||||
// If by any chance one line in the list is empty or contains a blank space, ignore it
|
||||
// It would probably be better to use regex here to detect blank space, but since
|
||||
// this is not likely to be triggered anyway, there is no need for that yet.
|
||||
if(lines[i] === '' || lines[i] === ' ') continue;
|
||||
|
||||
if (line.indexOf(lines[i]) > - 1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user