Fixed some item name escaping when containin < or > characters

This commit is contained in:
Louwrentius 2010-05-14 15:54:28 +00:00
parent 7c2d336dba
commit 9feea3fb59

7
ppss
View File

@ -1345,6 +1345,8 @@ escape_item () {
sed s/\\|/\\\\\\\\\\\\\\|/g | \
sed s/\&/\\\\\\\\\\\\\\&/g | \
sed s/\;/\\\\\\\\\\\\\\;/g | \
sed s/\>/\\\\\\\\\\>/g | \
sed s/\</\\\\\\\\\\</g | \
sed s/\(/\\\\\\\\\\(/g | \
sed s/\)/\\\\\\\\\\)/g `
}
@ -1628,6 +1630,7 @@ get_item () {
fi
ITEM="${ARRAY[$ARRAY_POINTER]}"
if [ -z "$ITEM" ]
then
((ARRAY_POINTER++))
@ -1707,7 +1710,6 @@ elapsed () {
}
commando () {
log DEBUG "-------------------------------------"
if [ "$DAEMON" == "1" ]
then
@ -1736,6 +1738,7 @@ commando () {
#
ITEM="$1"
if [ "$RECURSION" == "1" ]
then
escape_item "$ITEM"
@ -1754,6 +1757,7 @@ commando () {
# structure. If recursion is not used, this is not necessary.
#
if [ "$ERR_STATE" == "0" ]
then
VIRTUAL="0"
@ -1814,6 +1818,7 @@ commando () {
fi
fi
#
# Create the log file containing the output of the command.
#