Fixes #5369 allows ! in urls and adds unit tests