Quoting regexp to parse properly.

This commit is contained in:
Jared Cordasco
2010-01-04 17:01:29 -05:00
parent 0d5904658e
commit 0a7e6337b2

View File

@@ -259,7 +259,7 @@ cleaninput()
input=`echo $input | tr -d '\r|\n'` input=`echo $input | tr -d '\r|\n'`
# Check which action we are being used in as this affects what cleaning we do # Check which action we are being used in as this affects what cleaning we do
if [[ $action =~ ^(append|app|prepend|prep|replace)$ ]]; then if [[ $action =~ '^(append|app|prepend|prep|replace)$' ]]; then
# These actions use sed and & as the matched string so escape it # These actions use sed and & as the matched string so escape it
input=`echo $input | sed 's/\&/\\\&/g'` input=`echo $input | sed 's/\&/\\\&/g'`
fi fi