Documentation for the string method addingPercentEncoding(withAllowedCharacters:):
addingPercentEncoding(withAllowedCharacters:)
Returns a new string made from the receiver by replacing