diff --git a/utils/nsurl/parse.c b/utils/nsurl/parse.c index ce6f4435d..ff5f27bc3 100644 --- a/utils/nsurl/parse.c +++ b/utils/nsurl/parse.c @@ -302,6 +302,16 @@ static void nsurl__get_string_markers(const char * const url_s, ((*(pos - off + 5) == 'o') || (*(pos - off + 5) == 'O')))) { marker.scheme_type = NSURL_SCHEME_MAILTO; + } else if (off == SLEN("data") && + (((*(pos - off + 0) == 'd') || + (*(pos - off + 0) == 'D')) && + ((*(pos - off + 1) == 'a') || + (*(pos - off + 1) == 'A')) && + ((*(pos - off + 2) == 't') || + (*(pos - off + 2) == 'T')) && + ((*(pos - off + 3) == 'a') || + (*(pos - off + 3) == 'A')))) { + marker.scheme_type = NSURL_SCHEME_DATA; } /* Skip over colon */ diff --git a/utils/nsurl/private.h b/utils/nsurl/private.h index bc6737cd6..8032be0c2 100644 --- a/utils/nsurl/private.h +++ b/utils/nsurl/private.h @@ -36,7 +36,8 @@ enum nsurl_scheme_type { NSURL_SCHEME_HTTPS, NSURL_SCHEME_FILE, NSURL_SCHEME_FTP, - NSURL_SCHEME_MAILTO + NSURL_SCHEME_MAILTO, + NSURL_SCHEME_DATA };