From 781af1077aae0dd08b62089f69536ab6d9958634 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 12 Jul 2018 22:18:48 +0200 Subject: [PATCH] Fix invalid grep commands --- Inspection/Html/attributes.sh | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Inspection/Html/attributes.sh b/Inspection/Html/attributes.sh index 0cf92ba..97006f0 100644 --- a/Inspection/Html/attributes.sh +++ b/Inspection/Html/attributes.sh @@ -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 '(]*?)(/?>)' >> ${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