mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 16:55:07 -05:00
for #1235: Double quote to prevent globbing and word splitting.
As per @horazont's feedback: > Whenever you reference a variable ($foobar) and unless you know what you're doing, put it in double quotes.
This commit is contained in:
parent
7389c8a3e9
commit
f1197f143a
@ -26,11 +26,11 @@ else
|
|||||||
VALIDATION_RESULT=1;
|
VALIDATION_RESULT=1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FILE_NAME="$(basename -- $1)"
|
FILE_NAME=$(basename -- "$1")
|
||||||
HEADER_NUMBER=$(xmllint --xpath '/xep/header/number/text()' --nowarning --dtdvalid "$XEP_DTD" $1)
|
HEADER_NUMBER=$(xmllint --xpath '/xep/header/number/text()' --nowarning --dtdvalid "$XEP_DTD" "$1")
|
||||||
HEADER_STATUS=$(xmllint --xpath '/xep/header/status/text()' --nowarning --dtdvalid "$XEP_DTD" $1)
|
HEADER_STATUS=$(xmllint --xpath '/xep/header/status/text()' --nowarning --dtdvalid "$XEP_DTD" "$1")
|
||||||
HEADER_TYPE=$(xmllint --xpath '/xep/header/type/text()' --nowarning --dtdvalid "$XEP_DTD" $1)
|
HEADER_TYPE=$(xmllint --xpath '/xep/header/type/text()' --nowarning --dtdvalid "$XEP_DTD" "$1")
|
||||||
HEADER_APPROVER=$(xmllint --xpath '/xep/header/approver/text()' --nowarning --dtdvalid "$XEP_DTD" $1)
|
HEADER_APPROVER=$(xmllint --xpath '/xep/header/approver/text()' --nowarning --dtdvalid "$XEP_DTD" "$1")
|
||||||
|
|
||||||
if echo "$FILE_NAME" | grep -Eq "^xep-[0-9]{4}.xml$"
|
if echo "$FILE_NAME" | grep -Eq "^xep-[0-9]{4}.xml$"
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user