validate_and_escape_label will only escapes '"'.
However, string '\"' will be escaped to '\\"' which leads unmatched
double quote for shell string in result.
This adds escaping '\' in validate_and_escape_label to avoid the problem.
Signed-off-by: Jiro SEKIBA <jir@unicus.jp>
Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
g_string_insert_c (s, n, '\\');
n++;
}
+ else if (s->str[n] == '\\')
+ {
+ g_string_insert_c (s, n, '\\');
+ n++;
+ }
}
g_free (*label);
*label = g_string_free (s, FALSE);