From 41c5abebb2a3c77eb0494d7a436cb1bea2f7a6c2 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Sun, 2 Jun 2013 17:46:48 +0000 Subject: More tests! --- src/htsname.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/htsname.c b/src/htsname.c index 28e3edc..61bc66f 100644 --- a/src/htsname.c +++ b/src/htsname.c @@ -41,6 +41,7 @@ Please visit our Website: http://www.httrack.com #include "htsmd5.h" #include "htstools.h" #include "htscharset.h" +#include "htsencoding.h" #include #define ADD_STANDARD_PATH \ @@ -290,11 +291,14 @@ int url_savename(char *adr_complete, char *fil_complete, char *save, } fil = newfil; } - // Decode remaining % - strcpybuff(fil, unescape_http(catbuff, fil)); - // , BUT do not decode high chars - //strcpybuff(fil,unescape_http_unharm(fil, 1)); - // YES (not server side, but fs/client side) + + // decode remaining % (normally not necessary; already done in htsparse.c) + if (hts_unescapeUrl(fil, catbuff, sizeof(catbuff)) == 0) { + strcpybuff(fil, catbuff); + } else { + hts_log_print(opt, LOG_WARNING, + "could not URL-decode string '%s'", fil); + } #if HTS_USEMMS /* .asx hack */ -- cgit v1.2.3