X-Git-Url: http://git.shiar.net/perl/plp/.git/blobdiff_plain/693387f6e6cf5efde73b10242253bb38baf1612a..c425b50ff4140d6e6d9556fd1e4c380def5fc3e0:/PLP/Functions.pm diff --git a/PLP/Functions.pm b/PLP/Functions.pm index ea30488..ef5b311 100644 --- a/PLP/Functions.pm +++ b/PLP/Functions.pm @@ -253,17 +253,26 @@ In void context, B the values of the given variables. In other contexts <: print Entity($user_input); :> +Be warned that this function also HTMLizes consecutive whitespace and newlines (using   and
respectively). +For simple escaping, use L. To escape high-bit characters as well, use L. + =item EncodeURI LIST -Replaces characters by their %-encoded values. +Encodes URI strings according to RFC 3986. All disallowed characters are replaced by their %-encoded values. In void context, B the values of the given variables. In other contexts, returns the changed versions. Link +Note that the following reserved characters are I percent-encoded, even though they may have a special meaning in URIs: + + / ? : @ $ + +This should be safe for escaping query values (as in the example above), but it may be a better idea to use L instead. + =item DecodeURI LIST -Decodes %-encoded strings. +Decodes %-encoded strings. Unlike L, it also translates + characters to spaces (as browsers use those). In void context, B the values of the given variables. In other contexts, returns the changed versions. @@ -299,5 +308,7 @@ Adds a Set-Cookie header. STRING must be a valid Set-Cookie header value. Juerd Waalboer +Current maintainer: Mischa POSLAWSKY + =cut