C
Chris
Does anyone know of code to normalize a URL? We're processing a lot of URLs,
and we get a lot of bad ones:
http://mydomain.com/mydir/../anotherdir/ (/../)
http://mydomain.com/mydir\/anotherdir/ (backslashes)
http://mydomain.com/mydir//anotherdir/ (extra slashes)
http://mydomain.com/mydir/file name here.htm (filename with spaces)
I'm sure there's a lot of stuff out there that I haven't seen yet, either.
I'm wondering if anyone has already written a class that will clean this
stuff up.
and we get a lot of bad ones:
http://mydomain.com/mydir/../anotherdir/ (/../)
http://mydomain.com/mydir\/anotherdir/ (backslashes)
http://mydomain.com/mydir//anotherdir/ (extra slashes)
http://mydomain.com/mydir/file name here.htm (filename with spaces)
I'm sure there's a lot of stuff out there that I haven't seen yet, either.
I'm wondering if anyone has already written a class that will clean this
stuff up.