Replaced URLDecode and URLEncode by DecodeURLComponent and EncodeURLComponent respectively.