mirror of
https://github.com/Karaka-Management/Build.git
synced 2026-01-22 16:48:39 +00:00
Fix invalid grep commands
This commit is contained in:
parent
a7429fa17e
commit
781af1077a
|
|
@ -4,12 +4,7 @@
|
|||
|
||||
echo "Start html attributes inspection"
|
||||
|
||||
# Find empty attributes
|
||||
grep -rln "=\"\"" --include \*.tpl.php ${ROOT_PATH} > ${INSPECTION_PATH}/Modules/html/attributes_empty.log
|
||||
|
||||
# Find invalid attributes
|
||||
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(id=")([\ ]*)(")' > ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
|
||||
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(min=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
|
||||
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(max=")([a-zA-Z]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
|
||||
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(=")([#$%^&*\(\)\\/]*)(")' >> ${INSPECTION_PATH}/Modules/html/attributes_invalid.log
|
||||
find ${ROOT_PATH} -name "*tpl.php" | xargs grep '(<img(?!.*?alt=(["]).*?\2)[^>]*?)(/?>)' >> ${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