diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 0c7db0ee2a..cdea029d44 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Forced newer versions of RedCloth to use hard breaks [DHH] + * Added new scriptaculous options for auto_complete_field #2343 [m.stienstra@fngtps.com] * Don't prepend the asset host if the string is already a fully-qualified URL diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 2c718182fa..efb7922f76 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -82,7 +82,12 @@ module ActionView # Returns the text with all the Textile codes turned into HTML-tags. # This method is only available if RedCloth can be required. def textilize(text) - text.blank? ? "" : RedCloth.new(text, [ :hard_breaks ]).to_html + if text.blank? + "" + else + textilized = RedCloth.new(text, [ :hard_breaks ]) + textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=") + textilized.to_html end # Returns the text with all the Textile codes turned into HTML-tags, but without the regular bounding

tag. diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index d99b2c84e4..a3d22ed809 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -3,11 +3,13 @@ module ActiveRecord module DatabaseStatements # Returns an array of record hashes with the column names as keys and # column values as values. - def select_all(sql, name = nil) end + def select_all(sql, name = nil) + end # Returns a record hash with the column names as keys and column values # as values. - def select_one(sql, name = nil) end + def select_one(sql, name = nil) + end # Returns a single value from a record def select_value(sql, name = nil)