in reply to Re: ASCII to HTML in thread ASCII to HTML
You just need to be careful on this one how you set up the
textarea... if the textarea wraps the text automatically
the browser doesn't necessarily insert linebreaks for you.
So your users may type in an entire story with absolutely
no linebreaks, and the <pre> tags will force it all
on one line. In this case it's best to turn wrapping off
in the textarea, so the output will be a faithful reproduction
of what the user typed.
RE: RE: Re: ASCII to HTML
by turnstep (Parson) on Apr 05, 2000 at 05:09 UTC
|
Excellent point. I have a script that uses PRE tags and TEXTAREA input,
and I have to manually wrap the long lines using some code that
makes a good guess at where to insert a break if the line
is too long. Why some people don't hit the 'Enter' key once
in a while* is beyond me! Just goes to show you always have to check for all possible cases
when dealing with user input.
I've gotten people who put over 1000 characters on
one line. Sheesh!
| [reply] |
|