Fixed bug in generated URL
Added test for url sanitization