mirror of https://gitee.com/openkylin/libvirt.git
xend: urlencode: Properly escape '&'
Since we send the sexpr to xend via HTTP, we need to properly escape '&'
This commit is contained in:
parent
21108d37a3
commit
c8b2a23c02
|
@ -710,6 +710,7 @@ urlencode(const char *string)
|
|||
switch (string[i]) {
|
||||
case ' ':
|
||||
case '\n':
|
||||
case '&':
|
||||
snprintf(ptr, 4, "%%%02x", string[i]);
|
||||
ptr += 3;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue