Hello,
I’m making a blog and I need some function that convert the text
writed for a user in a textarea into a formated text.
I think to use h, but it forget paragraph breaks and I
like allow some tags.
By
Daniel
Hello,
I’m making a blog and I need some function that convert the text
writed for a user in a textarea into a formated text.
I think to use h, but it forget paragraph breaks and I
like allow some tags.
By
Daniel
I use RedCloth w/ h.
RedCloth.new(h comment).to_html
This will sanitize via h, and then convert textile commands to HTML.
On Tue, 28 Mar 2006, Rabbit wrote:
I like Redcloth:
http://whytheluckystiff.net/ruby/redcloth/
But in redcloth a user can insert tags that I don’t want allow.
Le Mercredi 29 Mars 2006 04:34, Daniel Hernandez a écrit :
Hello,
Hello,
I’m making a blog and I need some function that convert the text
writed for a user in a textarea into a formated text.
I think to use h, but it forget paragraph breaks and I
like allow some tags.
You can use simple_format, see :
http://api.rubyonrails.com/classes/ActionView/Helpers/TextHelper.html#M000510
Bye.
On Tue, 28 Mar 2006, Michael G. wrote:
I use RedCloth w/ h.
RedCloth.new(h comment).to_html
This will sanitize via h, and then convert textile commands to HTML.
But it has two problems:
but h sanitize it.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs