Allow to pass \n in argument to ejabberdctl
This commit is contained in:
parent
06f2237132
commit
47a67c7320
|
@ -163,7 +163,11 @@ shell_escape()
|
||||||
{
|
{
|
||||||
local RES=()
|
local RES=()
|
||||||
for i in "$@"; do
|
for i in "$@"; do
|
||||||
printf '%q ' "$i"
|
if test -z "$i"; then
|
||||||
|
printf '"" '
|
||||||
|
else
|
||||||
|
printf '"%q" ' "$i" | sed 's/\\\\n/\n/g;s/\\\\t/\t/g;s/\\\\r/\r/g'
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,7 @@ format_args(Args, ArgsFormat) ->
|
||||||
format_arg(Arg, integer) ->
|
format_arg(Arg, integer) ->
|
||||||
format_arg2(Arg, "~d");
|
format_arg2(Arg, "~d");
|
||||||
format_arg(Arg, binary) ->
|
format_arg(Arg, binary) ->
|
||||||
list_to_binary(format_arg(Arg, string));
|
unicode:characters_to_binary(Arg, utf8);
|
||||||
format_arg("", string) ->
|
format_arg("", string) ->
|
||||||
"";
|
"";
|
||||||
format_arg(Arg, string) ->
|
format_arg(Arg, string) ->
|
||||||
|
|
Loading…
Reference in New Issue