Redcloth Textile

Posted by Scott Tue, 20 Mar 2007 17:14:00 GMT

LeadsOnRails is currently deployed on Rails 1.1.6. Yesterday I added Textilize/Redcloth to part of the program and found that paragraphs did not show up as expected. I could not get blank lines between paragraphs because paragraphs were broken only by
breaks, not

.

After a little googling I found this to be a common complaint and saw that there is a setting to specify hard breaks or not.

The simplest solution that seemed to work for me was to simply override the Rails implementation by putting this in helpers/application_helper.rb:

  def textilize(str)
     RedCloth.new(str).to_html
  end 

Is this dangerous in any way? Any reason not to do this this way?

Comments

(leave url/email »)