summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2016-08-12 09:18:27 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2016-08-13 12:05:55 +0100
commita1668f6c1e0c9e88f62f6082c6206c4d33f25cce (patch)
treecc82ea197acf4041fb02335ad1b67f0b5058f8ed /utils
parentefeeacca8621076f285ead0fc7e95d61938daea6 (diff)
downloadnetsurf-a1668f6c1e0c9e88f62f6082c6206c4d33f25cce.tar.gz
netsurf-a1668f6c1e0c9e88f62f6082c6206c4d33f25cce.tar.bz2
url: Use ascii module, rather than ctype for locale safetly.
Diffstat (limited to 'utils')
-rw-r--r--utils/url.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/url.c b/utils/url.c
index 7a7b7a196..ee8485040 100644
--- a/utils/url.c
+++ b/utils/url.c
@@ -35,7 +35,9 @@
#include <assert.h>
#include <string.h>
#include <stdlib.h>
+#include <stdbool.h>
+#include "utils/ascii.h"
#include "utils/config.h"
#include "utils/log.h"
#include "utils/url.h"
@@ -92,7 +94,7 @@ nserror url_unescape(const char *str, size_t length,
char c1 = *(str + 1);
char c2 = *(str + 2);
- if (c == '%' && isxdigit(c1) && isxdigit(c2)) {
+ if (c == '%' && ascii_is_hex(c1) && ascii_is_hex(c2)) {
c = xdigit_to_hex(c1) << 4 | xdigit_to_hex(c2);
str += 2;
}