From: Mark Adkins Date: 2008-02-18T09:59:20+09:00 Subject: MySQL and new lines Hi, So I was having trouble earlier with getting MySQL to accept single quotes from a textarea, but I got that resolved using both the MySQL escape_string and the CGI escape method (I finally settled on the escape_string), and that's taken care of that problem. However, I can't seem to figure out how to keep newlines that are inserted by users? I've looked around on Google and can't seem to find any answers. I've tried gsub to replace the \n with a \n
(I saw that method employed with PHP's str_replace, but no luck here). Any other suggestions or solutions? Thanks a lot, Mark -- Posted via http://www.ruby-forum.com/.