fix when creating page with spaces in the url