Page 1 of 1
Guestbook, spamming without spaces scrolls to the right
Posted: Wed May 21, 2003 4:20 pm
by scr0p
On my guestbook, if the user types lets say "omgomgomgomogmomg" a lot of times, It will keep scrolling to the right, how would I make it go to another line at the edge of the table (html table)?
Posted: Wed May 21, 2003 7:41 pm
by McGruff
Have you tried setting a fixed width rather than a percentage width?
Or, you could even process POST'd text and delete any words longer than a set limit.
Posted: Wed May 21, 2003 7:43 pm
by jason
Posted: Wed May 21, 2003 8:54 pm
by scr0p
Thanks, about to check it out, before I do, how do I make it so that all the newline charecters are "preserved" I have a news edit script, when I type a neatly formatted post (with indentation and paragraphs), I want it to show like that on the news page, but how?
Posted: Wed May 21, 2003 9:39 pm
by McGruff
Take a look at nl2br().
If you want to preserve indentation, you'll need <pre> tags.