summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.118
1 files changed, 14 insertions, 4 deletions
diff --git a/txr.1 b/txr.1
index e3ab1535..a95f23b7 100644
--- a/txr.1
+++ b/txr.1
@@ -3697,15 +3697,15 @@ Convert the 26 lower case letters of the English alphabet to upper case.
.IP :downcase
Convert the 26 upper case letters of the English alphabet to lower case.
-.IP :fromurl
-Decode URL-encoded (a.k.a. percent-encoded) text. Character triplets consisting
+.IP :frompercent
+Decode percent-encoded text. Character triplets consisting
of the % character followed by a pair of hexadecimal digits (case insensitive)
are are converted to bytes having the value represented by the hexadecimal
digits (most significant nybble first). Sequences of one or more such bytes are
treated as UTF-8 data and decoded to characters.
-.IP :tourl
-Convert to URL encoding according to RFC 3986. The text is first converted
+.IP :topercent
+Convert to percent encoding according to RFC 3986. The text is first converted
to UTF-8 bytes. The bytes are then converted back to text as follows.
Bytes in the range 0 to 32, and 127 to 255 (note: including the ASCII DEL),
bytes whose values correspond to ASCII characters which are listed by RFC 3986
@@ -3716,6 +3716,16 @@ byte value (most significant nybble first, upper case). All other bytes
are converted directly to characters of the same value without any such
encoding.
+.IP :fromurl
+Decode from URL encoding, which is like percent encoding, except that
+if the unencoded + character occurs, it is decoded to a space character.
+Of course %20 still decodes to space, and %2B to the + character.
+
+.IP :tourl
+Encode to URL encoding, which is like percent encoding except that
+a space maps to + rather than %20. The + character, being in the
+reserved set, encodes to %2B.
+
Example: to escape HTML characters in all variable substitutions occuring in an
output clause, specify :filter :to_html in the directive: