Build/Inspection/Html/attributes.sh
2019-03-16 18:59:44 +00:00

11 lines
539 B
Bash
Executable File

#!/bin/bash
. config.sh
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 '(id|class)=\"[a-zA-Z]*[\#\$\%\^\&\*\(\)\\/\ ]+[a-zA-Z]*\"' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
find ${ROOT_PATH} -name "*tpl.php" | xargs grep -P '(\<img)((?!.*?alt=).)*(>)' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log