Ovid has asked for the wisdom of the Perl Monks concerning the following question:
I have a form with textareas on it where I am setting the wrap to physical.
The form is submitted using a Perl CGI script which saves the data to a MYSQL database. Checking the database contents reveals that I am saving the data with carriage returns and line feeds. However, when I print the data back out to a Web page, the line feeds are stripped. Thus, the users cannot format their text into paragraphs.
Using PRE tags allows the line feeds to show up, but then the each line scrolls off the right edge of the screen. I've tried setting the table width to 100% and also tried setting it to 800 pixels, both to no avail. How do I get around this?
I am thinking that a perl substitution like this would work:
The problem is, I don't know what belongs in "stuff to substitute."s/stuff to substitute/<P>\\n/g;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem displaying text with CGI
by lhoward (Vicar) on Jun 11, 2000 at 02:22 UTC | |
|
(jcwren) Re: Problem displaying text with CGI
by jcwren (Prior) on Jun 11, 2000 at 02:13 UTC | |
|
Re: Problem displaying text with CGI
by Zoogie (Curate) on Jun 11, 2000 at 02:04 UTC | |
|
Re: Problem displaying text with CGI
by outcast (Monk) on Jun 11, 2000 at 07:18 UTC | |
|
Re: Problem displaying text with CGI
by Cybercosis (Monk) on Jun 11, 2000 at 10:55 UTC | |
|
Re: Problem displaying text with CGI
by Ovid (Cardinal) on Jun 11, 2000 at 21:32 UTC |