chiark / gitweb /
url: Allow various `safe' characters unquoted in URL strings.
[mLib] / man / url.3
index 570623d1892bb5f1cf270e983d8a8e9c6aec966e..919ce933fe86e2fea32040877a428e9f17b632d5 100644 (file)
--- a/man/url.3
+++ b/man/url.3
@@ -11,7 +11,7 @@
 .sp 1
 .fi
 ..
-.TH url 3 "20 June 1999" mLib
+.TH url 3 "20 June 1999" "Straylight/Edgeware" "mLib utilities library"
 .SH NAME
 url \- manipulation of form-urlencoded strings
 .\" @url_initenc
@@ -57,6 +57,27 @@ string (see
 .BR dstr (3)
 for details).
 .PP
+You can set flags in the encoding context's
+.B f
+member:
+.TP
+.B URLF_STRICT
+Be strict about escaping non-alphanumeric characters.  Without this,
+potentially unsafe characters such as 
+.RB ` / '
+and
+.RB ` ~ '
+will be left unescaped, which makes encoded filenames (for example) more
+readable.
+.TP
+.B URLF_LAX
+Be very lax about non-alphanumeric characters.  Everything except
+obviously-unsafe characters like
+.RB ` & '
+and 
+.RB ` = '
+are left unescaped.
+.PP
 Decoding a sequence of name/value pairs is performed using the
 .B url_dec
 function.  It requires as input a
@@ -124,4 +145,4 @@ void encode(sym_table *t, dstr *d)
 .SH "SEE ALSO"
 .BR mLib (3).
 .SH AUTHOR
-Mark Wooding, <mdw@nsict.org>.
+Mark Wooding, <mdw@distorted.org.uk>.