diff --git a/lib/acts_as_sanitiled.rb b/lib/acts_as_sanitiled.rb index bd15816..3a45c40 100644 --- a/lib/acts_as_sanitiled.rb +++ b/lib/acts_as_sanitiled.rb @@ -115,7 +115,7 @@ def write_attribute(attr_name, value) private def strip_html(html) - html.gsub!(%r{

\n

}, "

\n\n

") # Workaround RedCloth 4.2.x issue + html = html.gsub(%r{

\n

}, "

\n\n

") # Workaround RedCloth 4.2.x issue Nokogiri::HTML::DocumentFragment.parse(html).inner_text end end