Topic: need help with RedCloth TextTile

I have installed the RedCloth textile gem.
My code to display the text is:
    <%= RedCloth.new( @blog.description ).to_html %>

My table field contains:
h1. this is a heading
sample text

* an item
* another item

# list 1
# list 2

What displays is the actual HTML code - like this:

<h1>this is a heading<br /> sample text</h1> <ul> <li>an item</li> <li>another item</li> </ul> <ol> <li>list 1</li> <li>list 2</li> </ol>

I want the browser to use that code to display the article.

Thanks

Last edited by reddirt (2012-01-28 22:49:49)

Re: need help with RedCloth TextTile

Try this:

<%= raw RedCloth.new( @blog.description ).to_html %>

Or

<%= RedCloth.new( @blog.description ) %>

Just guessing!

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: need help with RedCloth TextTile

Brad,
Thanks !!
The first one worked.

Dave

Last edited by reddirt (2012-01-29 00:37:10)