fixed url encoding for most common url formats, added tests for them.