mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
nsurl: Use locale agnostic helpers in host validation
Signed-off-by: Daniel Silverstone <dsilvers@netsurf-browser.org>
This commit is contained in:
parent
2ed30350d4
commit
dcd9baeb80
@ -1281,7 +1281,7 @@ static nserror nsurl__check_host_valid(lwc_string *host)
|
||||
nchrs -= 2;
|
||||
while (nchrs--) {
|
||||
const char ch = *chptr++;
|
||||
if (!isxdigit(ch) && ch != ':') {
|
||||
if (!ascii_is_hex(ch) && ch != ':') {
|
||||
/* Not hex digit or colon */
|
||||
return NSERROR_INVALID;
|
||||
}
|
||||
@ -1291,7 +1291,7 @@ static nserror nsurl__check_host_valid(lwc_string *host)
|
||||
|
||||
while (nchrs--) {
|
||||
const char ch = *chptr++;
|
||||
if (!isalnum(ch) && !(ch == '.' || ch == '-' || ch == '_')) {
|
||||
if (!ascii_is_alphanumerical(ch) && !(ch == '.' || ch == '-' || ch == '_')) {
|
||||
/* Not alphanumeric dot or dash */
|
||||
return NSERROR_INVALID;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user