<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: redcloth code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Tue, 22 Jul 2008 15:49:43 GMT</pubDate>
    <description>DZone Snippets: redcloth code</description>
    <item>
      <title>Better textilize</title>
      <link>http://snippets.dzone.com/posts/show/3628</link>
      <description>A better textilize helper that doesn't use the :hard_breaks option of RedCloth, like Rails' built-in textilize does (for whatever reason). Also escapes any HTML entered by the user (instead of dismissing it, as RedCloth's :filter_html option would do).&lt;br /&gt;&lt;br /&gt;This my not be what you need, but it's exactly what I need. :)&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;  def textilize(text)&lt;br /&gt;    RedCloth.new(text.gsub(/&lt;/, '&amp;lt;').gsub(/&gt;/, '&amp;gt;')).to_html&lt;br /&gt;  end&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Sun, 04 Mar 2007 17:07:20 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/3628</guid>
      <author>hmans (Hendrik Mans)</author>
    </item>
  </channel>
</rss>
