scan_urlencoded should convert '+' to ' '

master
leitner 23 years ago
parent 12e2ed69b6
commit e4832a2d23

@ -7,6 +7,7 @@
add FMT_LONG to fmt.h (FMT_ULONG plus 1 for sign) add FMT_LONG to fmt.h (FMT_ULONG plus 1 for sign)
fmt_strn did not work for out==NULL fmt_strn did not work for out==NULL
fix inconsistencies in man pages fix inconsistencies in man pages
make scan_urlencode do the '+' -> ' ' transformation
0.12: 0.12:
add textcode api for uuencode/uudecode, base64, quoted printable, add textcode api for uuencode/uudecode, base64, quoted printable,

@ -21,9 +21,10 @@ unsigned int scan_urlencoded(const char *src,char *dest,unsigned int *destlen) {
if (j<0) break; if (j<0) break;
dest[written]|=j; dest[written]|=j;
i+=2; i+=2;
} else { } if (s[i]=='+')
dest[written]=' ';
else
dest[written]=s[i]; dest[written]=s[i];
}
++written; ++written;
} }
*destlen=written; *destlen=written;

Loading…
Cancel
Save