If this is really needed, do this after splitting by ?, & and =.
If you want to support url's like this: example.com?url=example2.com%3Futm%3Dsomething you should probably use recursion ;) URLs like this will be cleaned after redirection to example2.com.
Please stop urlDecoding URL at a whole on the beginning of cleaning. This looses information! L460
For example:
foo@example.com
example.com?foo%3Dbar=baz
foo=bar
==baz
example.com?foo=bar=baz
foo
==bar=baz
Another:
example.com?foo=bar&ab%3Dcd=ef
ab=cd
==ef
ab
==cd=ef
is sentRelated https://github.com/Smile4ever/firefoxaddons/issues/73
If this is really needed, do this after splitting by
?
,&
and=
.If you want to support url's like this:URLs like this will be cleaned after redirection to example2.com.example.com?url=example2.com%3Futm%3Dsomething
you should probably use recursion ;)