No longer treat spaces as a valid character in URLs

Example where this is problematic (NSFW):
https://pixwhile.zangetsu.kaizoku.cyou/artworks/107464328
This commit is contained in:
blankie 2023-06-06 21:33:14 +07:00
parent fd020ed756
commit 21fc3e43d8
Signed by: blankie
GPG Key ID: CC15FC822C7F61F5
1 changed files with 1 additions and 2 deletions

View File

@ -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