The backslash replacement in https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/URL.cpp#L470 should happen after the C0 controls and space removal at https://github.com/WebKit/webkit/blob/master/Source/WebCore/platform/URL.cpp#L492 because otherwise e.g. " data:\" turns into "data:/" which does not seem desired. (I was also wondering if we could limit the backslash replacement to only the special schemes: http/https/ftp/gopher/file/ws/wss?)
Thank you, good catch! > (I was also wondering if we could limit the backslash replacement to only the special schemes: http/https/ftp/gopher/file/ws/wss?) Wait, so we perform backslash replacement for custom protocols? That seems crazy, hopefully no clients rely on that.
Yes, both these changes seem worthwhile.
All this code changed due to the URL rewrite. And we match the standard except for a couple known cases.