From 2af2b7f54875ca7ea9afab627c0e946a83f7f0b4 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 12 Jul 2018 22:35:36 +0200 Subject: [PATCH] Fix bug where empty attributes are not checked --- Hooks/syntax.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index a4a92ba..a6b5559 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -29,7 +29,7 @@ fi # Html checks if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then - if [[ -n $(grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]+\"' $FILE) ]]; then + if [[ -n $(grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]*\"' $FILE) ]]; then echo -e "\e[1;31m\tFound invalid attribute.\e[0m" >&2 grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]*\"' $FILE >&2 exit 1