Fixed bug with blacklist and whitelist.

This commit is contained in:
Mario Basic
2015-06-19 13:03:54 +02:00
parent fb6e8bee75
commit c98fbf93e9
5 changed files with 32 additions and 8 deletions

View File

@@ -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;
}