From 21fc3e43d829f43da5588b6244420588d89df0b1 Mon Sep 17 00:00:00 2001 From: blankie Date: Tue, 6 Jun 2023 21:33:14 +0700 Subject: [PATCH] No longer treat spaces as a valid character in URLs Example where this is problematic (NSFW): https://pixwhile.zangetsu.kaizoku.cyou/artworks/107464328 --- blankie/murl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/blankie/murl.cpp b/blankie/murl.cpp index 2c69865..a17dfe8 100644 --- a/blankie/murl.cpp +++ b/blankie/murl.cpp @@ -8,8 +8,7 @@ #define UNRESERVED "[\\w\\d\\-._~]" #define PCT_ENCODED "%[\\da-f]{2}" -// A space is added to sub-delims to make it work with URLs that have a space -#define SUB_DELIMS "[!$&'()*+,;= ]" +#define SUB_DELIMS "[!$&'()*+,;=]" #define USERINFO "((?:" UNRESERVED "|" PCT_ENCODED "|" SUB_DELIMS "|:)*)" // A lot looser than RFC 3986, but things will go very wrong very quickly if I comply