python cgi problem with textarea

placid Bulkan at
Tue Apr 24 13:00:25 CEST 2007

On Apr 24, 4:52 pm, Tim Roberts <t... at> wrote:
> placid <Bul... at> wrote:
> >On Apr 23, 1:01 am, Adrian Smith <adrian_p_sm... at> wrote:
> >> On Apr 22, 10:09 pm, placid <Bul... at> wrote:
> >> > i just tried it and its working. here it is
> >> >
> >> > maybe the internal server error is because mod_python isn't installed
> >> > assuming your using Apache as your web server
> >> Yeah, but it wouldn't work *at all* in that case, would it? ATM it
> >> seems to work as long as the textarea input has no spaces.
> >it doest work because the "space" character isnt interpreted
> >correctly, you need to change the space characters too  
> What???  Did you even read the problem description?

oops...i did read the problem description, but i when i tried the code
it worked for me and when i put spaces into the TextArea it wasn't
reflected correctly back. So i thought this was the problem.

Adrian, can you still try replacing spaces with   via the

import cgi
import urllib
import cgitb
print "Content-type: text/html\n"
form = cgi.FieldStorage()
#print urllib.quote_plus(form["essay"].value)

for char in form["essay"].value:
   if char == ' ':
      print " "
      print char


More information about the Python-list mailing list