Skip to main content

shell_quote

Function shell_quote 

Source
pub fn shell_quote(unquoted_string: impl AsRef<OsStr>) -> OsString
Expand description

of the quotes. Beware: this only works because shell_parse_argv() is not a real Unix shell. Quoting untrusted input is not an adequate security mechanism when using a real shell.

The return value must be freed with g_free().

The quoting style used is undefined (single or double quotes may be used).

§unquoted_string

a literal string

§Returns

quoted string