diff --git a/Hooks/filename.sh b/Hooks/filename.sh
index 8470026..60b9c41 100644
--- a/Hooks/filename.sh
+++ b/Hooks/filename.sh
@@ -4,7 +4,7 @@ isValidFileName() {
allownonascii="false"
if [ "$allownonascii" != "true" ] &&
- test $(git diff --cached --name-only --diff-filter=A -z $1 |
+ test $(git diff --cached --name-only --diff-filter=A -z "$1" |
LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0
then
return 0
diff --git a/Hooks/syntax.sh b/Hooks/syntax.sh
index e13aaa0..2dadac0 100644
--- a/Hooks/syntax.sh
+++ b/Hooks/syntax.sh
@@ -24,37 +24,37 @@ hasInvalidPhpSyntax() {
hasInvalidHtmlTemplateContent() {
# Images must have a alt= attribute *error*
- if [[ -n $(grep -P '(\)' $1) ]]; then
+ if [[ -n $(grep -P '(\
)' "$1") ]]; then
return 1
fi
# Input elements must have a type= attribute *error*
- if [[ -n $(grep -P '()' $1) ]]; then
+ if [[ -n $(grep -P '()' "$1") ]]; then
return 2
fi
# Form fields must have a name *error*
- if [[ -n $(grep -P '()' $1) ]]; then
+ if [[ -n $(grep -P '()' "$1") ]]; then
return 3
fi
# Form must have a id, action and method *error*
- if [[ -n $(grep -P '(\