X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fconvert.c;h=61bbe6e2c26e580814801fef74bab544ce0b94f7;hp=71e3d8f03a4346a96565152158d55a43c4f18951;hb=4a08094db88011153adadbf995103770b20d2a31;hpb=9dadbf6fe9577a6a6b7e7bab4e4b782fc1a6f86c diff --git a/src/convert.c b/src/convert.c index 71e3d8f0..61bbe6e2 100644 --- a/src/convert.c +++ b/src/convert.c @@ -1,6 +1,6 @@ /* Conversion of links to local files. Copyright (C) 2003, 2004, 2005, 2006, 2007, - 2008 Free Software Foundation, Inc. + 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Wget. @@ -598,8 +598,8 @@ find_fragment (const char *beg, int size, const char **bp, const char **ep) "index.html?foo=bar.html" to "index.html%3Ffoo=bar.html" should be safe for both local and HTTP-served browsing. - We always quote "#" as "%23" and "%" as "%25" because those - characters have special meanings in URLs. */ + We always quote "#" as "%23", "%" as "%25" and ";" as "%3B" + because those characters have special meanings in URLs. */ static char * local_quote_string (const char *file) @@ -607,7 +607,7 @@ local_quote_string (const char *file) const char *from; char *newname, *to; - char *any = strpbrk (file, "?#%"); + char *any = strpbrk (file, "?#%;"); if (!any) return html_quote_string (file); @@ -627,6 +627,11 @@ local_quote_string (const char *file) *to++ = '2'; *to++ = '3'; break; + case ';': + *to++ = '%'; + *to++ = '3'; + *to++ = 'B'; + break; case '?': if (opt.adjust_extension) { @@ -913,7 +918,7 @@ static struct hash_table *downloaded_files_hash; However, our hash tables only accept pointers for keys and values. So when we need a pointer, we use the address of a downloaded_file_t variable of static storage. */ - + static downloaded_file_t * downloaded_mode_to_ptr (downloaded_file_t mode) {