On Wed, 01 Sep 2004 18:26:47 +0200, Massimiliano Campagnoli maxi@paoloastori.com wrote:
Try to handle this html form:
<html> <body> <form name="my-form" action="/tbnl/form" method="post"> <input type=text name=":myfield" value="foo"> </form> </body> </html>
after submitting this form in TBNL *debug-mode* you will get:
(post-parameters) (("%3Amyfield" . "foo"))
instead of
(("myfield" . "foo" ))
That would be strange. I hope you expected
((":myfield" . "foo" ))
Any explanation for this ?
Yes, that's how the browser sends the field's name. When accepting POST or GET parameters the values are URL-decoded (see request.lisp and the function FORM-URL-ENCODED-LIST-TO-ALIST in util.lisp), the names aren't. Do you think it would make sense to decode the names as well? It'd be a trivial code change but I'm not sure about the implications. What do the RFCs say? Are there any restrictions on the names of the parameters?
Cheers, Edi.