Why do I have to remove percent encoding twice for an encoded string? – Ios swift
This is my simple extension: extension String { var urlDecoded: String? { replacingOccurrences(of: "+", with: "%20").removingPercentEncoding } } And here is my string: let string = "https%253A%252F%252Fplz.pl" After I call let firstDecoded = string.urlDecoded // "https%3A%2F%2Fplz.pl" let secondDecoded = string.urlDecoded?.urlDecoded…