cleaning urls.
thanks to
http://stackoverflow.com/a/6883094/2075157