Add documentatin for PARSE-HTML-FORMS.
This commit is contained in:
		
							parent
							
								
									f8487a2158
								
							
						
					
					
						commit
						bf0d37476a
					
				|  | @ -622,6 +622,27 @@ that following procedure cause an error if called: | |||
|   \ex{eval-safely} returns \sharpf. | ||||
| \end{defundesc} | ||||
| 
 | ||||
| \section{Writing Request Handlers} | ||||
| 
 | ||||
| \subsection{Parsing HTML Forms} | ||||
| 
 | ||||
| In HTML forms, field data are turned into a single string, of the form | ||||
| \texttt{\synvar{name}=\synvar{val}\&\synvar{name}=\synvar{val}\ldots}. | ||||
| The \ex{parse-html-forms} structure provides simple functionality to | ||||
| parse these strings. | ||||
| 
 | ||||
| \defun{parse-html-form-query}{string}{alist} | ||||
| \begin{desc} | ||||
|   This parses \verb|"foo=x&bar=y"| into \verb|(("foo" . "x") ("bar" . | ||||
|   "y"))|.  Substrings are plus-decoded (i.-e.\ plus characters are | ||||
|   turned into spaces) and then URI-decoded. | ||||
| 
 | ||||
|   This implementation is | ||||
|   slightly sleazy as it will successfully parse a string like | ||||
|   \verb|"a&b=c&d=f"| into \verb|(("a&b" . "c") ("d" .  "f"))| without | ||||
|   a complaint. | ||||
| \end{desc} | ||||
| 
 | ||||
| %%% Local Variables:  | ||||
| %%% mode: latex | ||||
| %%% TeX-master: "man" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 sperber
						sperber