mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Quote and unquote backslashes from keyserver search responses.
This commit is contained in:
parent
47c8a325f5
commit
9fb6cae5e4
3 changed files with 19 additions and 2 deletions
|
@ -152,7 +152,7 @@ parse_keyserver_uri(char *uri)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Unquote only the delimiter character */
|
||||
/* Unquote only the delimiter character and backslash */
|
||||
static void
|
||||
printunquoted(char *string,char delim)
|
||||
{
|
||||
|
@ -164,12 +164,17 @@ printunquoted(char *string,char delim)
|
|||
{
|
||||
int c;
|
||||
|
||||
sscanf(ch,"\\x%02X",&c);
|
||||
sscanf(ch,"\\x%02x",&c);
|
||||
if(c==delim)
|
||||
{
|
||||
printf("%c",c);
|
||||
ch+=3;
|
||||
}
|
||||
else if(c=='\\')
|
||||
{
|
||||
fputc('\\',stdout);
|
||||
ch+=3;
|
||||
}
|
||||
else
|
||||
fputc(*ch,stdout);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue