I''m having trouble pre-populationg textarea with content that has multiple newlines. It seems to be treating two \n characters as one \n character. In fact I believe we have a \r\n\r\n but for some reason the text area is not showing me the extra new line. Does anyone have any suggestions? <textarea name="content"><%= @content %></textarea> where @content is: This is paragraph one This is paragraph two This is paragraph three The textarea will show: This is paragraph one This is paragraph two This is paragraph three Somehow it''s ignoring the multiple line breaks. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I''d like to bump this one -- I''ve googled and every answer I find wants to install some text formatting plugin or use a bunch of JS to fix it -- blech! In Lasso, this just worked. textarea->MySQL->webpage just plain worked. I''ve monkeyed with various regex tweaks, with and without h(), and somehow Ruby or Rails just wants to screw this up. -- gw -kinetic wrote:> I''m having trouble pre-populationg textarea with content that has > multiple newlines. It seems to be treating two \n characters as one > \n character. In fact I believe we have a \r\n\r\n but for some > reason the text area is not showing me the extra new line. > > Does anyone have any suggestions? > > <textarea name="content"><%= @content %></textarea> > > > where @content is: > > This is paragraph one > > This is paragraph two > > This is paragraph three > > > The textarea will show: > > This is paragraph one > This is paragraph two > This is paragraph three > > Somehow it''s ignoring the multiple line breaks. > > > Thanks!-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Which browser(s) are you using. Works fine for me in Safari 3.1.1. ~ Mark -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Jun 17, 2008, at 2:36 PM, Greg Willits wrote:> I''d like to bump this one -- I''ve googled and every answer I find > wants > to install some text formatting plugin or use a bunch of JS to fix > it -- > blech! > > In Lasso, this just worked. textarea->MySQL->webpage just plain > worked. > I''ve monkeyed with various regex tweaks, with and without h(), and > somehow Ruby or Rails just wants to screw this up.Ah, geeeeeezzzzz. I was using ''\n'' instead of "\n" in some validation parsing. self.moron! -- gw --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---