How do I make a post to a blog format with the same breaks the user added? for example: the user typed in: ''Hello This is a post'' And my output is like this: ''Hello This is a post'' How do I format it with the correct 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 -~----------~----~----~----~------~----~------~--~---
On Tue, 2007-10-16 at 17:17 +0200, David Modernfossil wrote:> How do I make a post to a blog format with the same breaks the user > added? > > for example: > > the user typed in: > > ''Hello > > This is a post'' > > And my output is like this: > > ''Hello This is a post'' > > How do I format it with the correct breaks?simple_format -- Tore Darell toredarell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Trondheim, NO http://tore.darell.no/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Will simple_format protect from embedded nasty html? On 10/16/07, Tore Darell <toredarell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> simple_format--~--~---------~--~----~------------~-------~--~----~ 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 Tue, 2007-10-16 at 10:31 -0500, Michael Graff wrote:> Will simple_format protect from embedded nasty html?No, you need h() in addition to it: simple_format(h(text)) -- Tore Darell toredarell-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Trondheim, NO http://tore.darell.no/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---