diff --git a/scripts/xdg-open.in b/scripts/xdg-open.in index 00b6f9a..d657d96 100644 --- a/scripts/xdg-open.in +++ b/scripts/xdg-open.in @@ -124,7 +124,8 @@ DEBUG 3 "$xdg_user_dir:$xdg_system_dirs" command="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | first_word`" command_exec=`which $command 2>/dev/null` arguments="`grep -E "^Exec(\[[^]=]*])?=" "$file" | cut -d= -f 2- | last_word`" - arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$1"'"*g'`" + arg_one="`echo $1 | sed 's/&/\\\\&/g'`" + arguments_exec="`echo $arguments | sed -e 's*%[fFuU]*"'"$arg_one"'"*g'`" if [ -x "$command_exec" ] ; then if echo $arguments | grep -iq '%[fFuU]' ; then eval $command_exec $arguments_exec