summaryrefslogtreecommitdiffstats
path: root/Doc/lib/liburllib.tex
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-12-13 14:48:47 (GMT)
committerGuido van Rossum <guido@python.org>1996-12-13 14:48:47 (GMT)
commit8d40c843c1df376412e8290ec1ca3e36cc1848c3 (patch)
treea7bacc2f951ba7612f9842240324e64a651ad090 /Doc/lib/liburllib.tex
parent0564e12367dc10349cd5596bdbe9bbcb44e112c2 (diff)
downloadcpython-8d40c843c1df376412e8290ec1ca3e36cc1848c3.zip
cpython-8d40c843c1df376412e8290ec1ca3e36cc1848c3.tar.gz
cpython-8d40c843c1df376412e8290ec1ca3e36cc1848c3.tar.bz2
Added quote_plus() and unquote_plus(), to do space/plus substitutions
for form field values. Also corrected substitution example (the original changed the spelling of "conolly" to "connolly" :).
Diffstat (limited to 'Doc/lib/liburllib.tex')
-rw-r--r--Doc/lib/liburllib.tex12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/lib/liburllib.tex b/Doc/lib/liburllib.tex
index b26228f..2eaa5f3 100644
--- a/Doc/lib/liburllib.tex
+++ b/Doc/lib/liburllib.tex
@@ -59,7 +59,12 @@ Letters, digits, and the characters ``\code{_,.-}'' are never quoted.
The optional \var{addsafe} parameter specifies additional characters
that should not be quoted --- its default value is \code{'/'}.
-Example: \code{quote('/\~conolly/')} yields \code{'/\%7econnolly/'}.
+Example: \code{quote('/\~connolly/')} yields \code{'/\%7econnolly/'}.
+\end{funcdesc}
+
+\begin{funcdesc}{quote_plus}{string\optional{\, addsafe}}
+Like \code{quote()}, but also replaces spaces by plus signs, as
+required for quoting HTML form values.
\end{funcdesc}
\begin{funcdesc}{unquote}{string}
@@ -68,6 +73,11 @@ Replace \samp{\%xx} escapes by their single-character equivalent.
Example: \code{unquote('/\%7Econnolly/')} yields \code{'/\~connolly/'}.
\end{funcdesc}
+\begin{funcdesc}{unquote_plus}{string}
+Like \code{unquote()}, but also replaces plus signs by spaces, as
+required for unquoting HTML form values.
+\end{funcdesc}
+
Restrictions:
\begin{itemize}