better uri encoding and slug generation