mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-11 11:48:40 +00:00
Fix bug where empty attributes are not checked
This commit is contained in:
parent
a523c9968f
commit
a0c0b838db
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 '(\<img)((?!.*?alt=).)*(>)' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user