fix when creating page with spaces in the url

fix when creating page with spaces in the url