There&#x27;s already a solution in the spec for the slash issue<p>Either you have a valid scheme or you don&#x27;t, and either you have a relative path or an absolute path<p>Double slash after a valid scheme implies an authority, if a 3rd slash exists it&#x27;s an absolute path, anything past the 3rd slash has to be normalized. So, <a href="http:&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;" rel="nofollow">http:&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;&#x2F;</a> is actually <a href="http:&#x2F;&#x2F;&#x2F;" rel="nofollow">http:&#x2F;&#x2F;&#x2F;</a><p>If you have an invalid scheme or a relative path such as http:&#x2F; or +<a href="http:&#x2F;&#x2F;" rel="nofollow">http:&#x2F;&#x2F;</a> it would actually be normalized to .&#x2F;http:&#x2F; .&#x2F;+http:&#x2F;<p><a href="https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc3986#section-4.2" rel="nofollow">https:&#x2F;&#x2F;tools.ietf.org&#x2F;html&#x2F;rfc3986#section-4.2</a>