Change slugify function to URI encode slugs