When a file name is manufactured from a URL, the percent sign is removed to
prevent the web server or the browser from requesting a file with a % in
it.
The server or the browser would decode the percent sign if the two
subsequent bytes happened to be a valid hexadecimal byte and would request
the wrong file.
filesize--;
skip=0;
for(i=0; i<filesize && *url; url++) {
- if(isalnum(*url) || *url=='-' || *url=='_' || *url=='.' || *url=='%') {
+ if(isalnum(*url) || *url=='-' || *url=='_' || *url=='.') {
file[i++]=*url;
skip=0;
} else {