chiark / gitweb /
codec/url.3: Add missing documentation for the `URLF_SEMI' flag.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 10 May 2023 22:56:44 +0000 (23:56 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 10 May 2023 23:03:34 +0000 (00:03 +0100)
codec/url.3

index 4e8aa71a335b42dc84c7629064676e3e401bd570..7f6bcf055c2f3f6a76131b53e3135c553871f167 100644 (file)
@@ -77,6 +77,12 @@ obviously-unsafe characters like
 and
 .RB ` = '
 are left unescaped.
+.TP
+.B URLF_SEMI
+Use a semicolon
+.RB ` ; '
+to separate name/value pairs, rather than the ampersand
+.RB ` & '.
 .PP
 Decoding a sequence of name/value pairs is performed using the
 .B url_dec
@@ -98,6 +104,26 @@ so you probably want to reset them before each call.  If there are no
 more name/value pairs to read,
 .B url_dec
 returns zero; otherwise it returns a nonzero value.
+.PP
+You can set flags in the encoding context's
+.B f
+member:
+.TP
+.B URLF_SEMI
+Allow a semicolon
+.RB ` ; '
+to separate name/value pairs,
+.I in addition to
+the ampersand
+.RB ` & '.
+Without this flag, the semicolon is considered an `ordinary' character
+which can appear unescaped as part of names and values.  (Note the
+difference from the same flag's meaning when encoding.  When encoding,
+it
+.I forces
+the use of the semicolon, and when decoding, it
+.I permits
+its use.)
 .SH EXAMPLE
 The example code below demonstrates converting between a symbol table
 and a urlencoded representation.  The code is untested.