diff --git a/lib/core_ext/string.rb b/lib/core_ext/string.rb index c4e73b2f4..817d9f9ac 100644 --- a/lib/core_ext/string.rb +++ b/lib/core_ext/string.rb @@ -86,7 +86,7 @@ class String string.gsub!( %r{
(.+?)
}m ) { |placeholder| placeholder = placeholder.gsub(/\n/, '###BR###') } - string.gsub!( %r{(.+?)/}m ) { |placeholder| + string.gsub!( %r{(.+?)}m ) { |placeholder| placeholder = placeholder.gsub(/\n/, '###BR###') } @@ -106,9 +106,9 @@ class String string.gsub!(%r{]*)>}i, "___\n") # add new lines - string.gsub!( %r{\<(br|table)(|/| [^>]*)\>}i, "\n" ) - string.gsub!( %r{\}i, "\n" ) - string.gsub!( %r{/}i, ' ' ) + string.gsub!( %r{<(br|table)(|/| [^>]*)>}i, "\n" ) + string.gsub!( %r{}i, "\n" ) + string.gsub!( %r{}i, ' ' ) # strip all other tags string.gsub!( /\<.+?\>/, '' )