X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fconvert.c;fp=src%2Fconvert.c;h=653c7b4d97d960345b5d071e1130fca5d0817265;hp=71e3d8f03a4346a96565152158d55a43c4f18951;hb=b4dca1816fcb6ffdf6da04b9952a78e881d1bebe;hpb=4198c7239f11f85002798dd4fce4f0bc1042547a diff --git a/src/convert.c b/src/convert.c index 71e3d8f0..653c7b4d 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) {