Add a helper function to normalize URLs in views