[Tutor] String puzzle...

Sharriff Aina NHYTRO@compuserve.com
Fri, 1 Jun 2001 05:30:03 -0400


Hi guys!

This tiny bug hast stopped me releasing my online HTML Page editor for
testing. I am retrieveng per python/CGI HTML code from a clients browser
and storing in a databse on a remote server. The same client can edit his=

and save hispages. To facilitate the bility to edit existing pages, I jus=
t
retrieve the content from the databse and present it in a content editor =
in
a browser client automatically.

THE BUG
----------------------

As long as the the HTML is written with out carriage returns from the use=
r,
everything is fine. The carriage return or "<P>" tag is entered by the us=
er
from the browser by tapping the enter key. The editor on its part fails t=
o
display any text or HTML code that is not written in the same line, it
complains of an "Unterminated String" error.

I have stripped spaces, by database entry, and database access for writin=
g,
but the cgi always writes the TEXT/HTML in separte lines if he user has
inputted a carriage return in the entry/edit form.

THE QUESTION
-----------------------------

How do I strip a a carriage return? is it really a carriage return thats
tripping my code up?


Sorry for rambling, but the problem was too difficult to descibe in fewer=

sentences.


Best regards


Sharriff