Fix bug where empty attributes are not checked

This commit is contained in:
Dennis Eichhorn 2018-07-12 22:35:36 +02:00
parent a0c0b838db
commit 2af2b7f548

View File

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