Updated percent escaping to use native NSString methods