diff --git a/lib/redmine/wiki_formatting/textile/formatter.rb b/lib/redmine/wiki_formatting/textile/formatter.rb
index a622e80..cd52c84 100644
--- a/lib/redmine/wiki_formatting/textile/formatter.rb
+++ b/lib/redmine/wiki_formatting/textile/formatter.rb
@@ -15,12 +15,12 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-require 'redcloth3'
+require 'redcloth'
 
 module Redmine
   module WikiFormatting
     module Textile
-      class Formatter < RedCloth3
+      class Formatter < RedCloth::TextileDoc
         include ActionView::Helpers::TagHelper
         
         # auto_link rule after textile rules so that it doesn't break !image_url! tags
@@ -31,6 +31,7 @@ module Redmine
           self.hard_breaks=true
           self.no_span_caps=true
           self.filter_styles=true
+          self.filter_html=true
         end
         
         def to_html(*rules)
@@ -38,7 +39,7 @@ module Redmine
           super(*RULES).to_s
         end
   
-      private
+      protected
   
         # Patch for RedCloth.  Fixed in RedCloth r128 but _why hasn't released it yet.
         # <a href="http://code.whytheluckystiff.net/redcloth/changeset/128">http://code.whytheluckystiff.net/redcloth/changeset/128</a>
@@ -66,7 +67,7 @@ module Redmine
           # removes wiki links from the item
           toc_item = content.gsub(/(\[\[([^\]\|]*)(\|([^\]]*))?\]\])/) { $4 || $2 }
           # sanitizes titles from links
-          # see redcloth3.rb, same as "#{pre}#{text}#{post}"
+          # see redcloth, same as "#{pre}#{text}#{post}"
           toc_item.gsub!(LINK_RE) { [$2, $4, $9].join }
           # sanitizes image links from titles
           toc_item.gsub!(IMAGE_RE) { [$5].join }
