encode :: [Char] -> [Char] decode :: [Char] -> [Char] encodeQuery :: [([Char], [Char])] -> [Char] decodeQuery :: [Char] -> [([Char], [Char])]
encode converts a string by escaping special characters, returning a string suitable for use in a
URL. The function
decode undoes the effect of
When the contents of a form (here referred to as a query) is submitted to a web server, it is encoded as a sequence of pairs of field names and values in the following way:
Special characters, like
& and spaces, occuring in the field
names and values, are escaped, as with the function
decodeQuery convert to and from the
above form, applying
decode, respectively, to the
parts of the query.
encode "Sixth Sense, The (1999)" = "Sixth+Sense%2C+The+%281999%29"
deocdeQuery "year=1999&actor=Willis%2C+Bruce" = [("year","1999"),("actor","Willis, Bruce")]
The Computing dictionary entry for URL.