summaryrefslogtreecommitdiff
path: root/src/htsname.c
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2013-06-02 17:46:48 +0000
committerXavier Roche <xroche@users.noreply.github.com>2013-06-02 17:46:48 +0000
commit41c5abebb2a3c77eb0494d7a436cb1bea2f7a6c2 (patch)
tree95d410a66e651a286811db58d4b4cc7c6fd9982e /src/htsname.c
parentf23e4b0ce677a08665ec7f3e662569e12326913b (diff)
More tests!
Diffstat (limited to 'src/htsname.c')
-rw-r--r--src/htsname.c14
1 files changed, 9 insertions, 5 deletions
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 <ctype.h>
#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 */