Skip to content

Commit 0972dbc

Browse files
committed
Fixing duplicate-whitelist-cleanup.sh to regex escape host
1 parent 0930b16 commit 0972dbc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/validations/special/duplicate-whitelist-cleanup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ TMPFILE=`mktemp /tmp/buffer.XXXXXXXX`
44
trap 'rm "$TMPFILE"' EXIT
55

66
for host in `cat test/validations/special/duplicate-whitelist.txt`; do
7-
REPEATS=`egrep -l "<target\s+host=\s*\"$host\"\s*/>" src/chrome/content/rules/*.xml | wc -l`
7+
REGEX_ESCAPED_HOST=`python3.6 -c "import re; print(re.escape('$host'))"`
8+
REPEATS=`egrep -l "<target\s+host=\s*\"$REGEX_ESCAPED_HOST\"\s*/>" src/chrome/content/rules/*.xml | wc -l`
89
if [ $REPEATS -gt 1 ]; then
910
echo $host
1011
fi

0 commit comments

Comments
 (0)