diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh index 9f2b571..a4a92ba 100644 --- a/Hooks/syntax.sh +++ b/Hooks/syntax.sh @@ -31,7 +31,7 @@ fi if [[ "$FILE" =~ ^.+(tpl\.php|html)$ ]]; then if [[ -n $(grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]+\"' $FILE) ]]; then echo -e "\e[1;31m\tFound invalid attribute.\e[0m" >&2 - grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]+\"' $FILE >&2 + grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]*\"' $FILE >&2 exit 1 fi diff --git a/Inspection/Html/attributes.sh b/Inspection/Html/attributes.sh index 97006f0..96d6830 100644 --- a/Inspection/Html/attributes.sh +++ b/Inspection/Html/attributes.sh @@ -5,6 +5,6 @@ echo "Start html attributes inspection" # Find invalid attributes -find ${ROOT_PATH} -name "*tpl.php" | xargs grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]+\"' > ${INSPECTION_PATH}/Modules/html/attributes_invalid.log +find ${ROOT_PATH} -name "*tpl.php" | xargs grep -E '=\"[\#\$\%\^\&\*\(\)\\/\ ]*\"' > ${INSPECTION_PATH}/Modules/html/attributes_invalid.log find ${ROOT_PATH} -name "*tpl.php" | xargs grep -E '(id|class)=\"[a-zA-Z]*[\#\$\%\^\&\*\(\)\\/\ ]+[a-zA-Z]*\"' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log find ${ROOT_PATH} -name "*tpl.php" | xargs grep -P '(\)' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log