aboutsummaryrefslogtreecommitdiff
path: root/src/util/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/url.c')
-rw-r--r--src/util/url.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/util/url.c b/src/util/url.c
index 5962a18b2..3fbc4a048 100644
--- a/src/util/url.c
+++ b/src/util/url.c
@@ -365,4 +365,20 @@ TALER_url_absolute_raw (const char *proto,
365} 365}
366 366
367 367
368bool
369TALER_url_valid_charset (const char *url)
370{
371 for (unsigned int i = 0; '\0' != url[i]; i++)
372 {
373#define ALLOWED_CHARACTERS \
374 "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/:&?-.,=_~%"
375 if (NULL == strchr (ALLOWED_CHARACTERS,
376 (int) url[i]))
377 return false;
378#undef ALLOWED_CHARACTERS
379 }
380 return true;
381}
382
383
368/* end of url.c */ 384/* end of url.c */