Normalize issue description EOLs do prevent false journal details (#8712).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6149 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2011-07-02 11:42:46 +00:00
1 parent 0a9bf389ef
commit 66f026aa78
2 files changed
+13 -1

No files matched your search

+7
View File
@@ -227,6 +227,13 @@ class Issue < ActiveRecord::Base
@custom_field_values = nil
result
end
def description=(arg)
if arg.is_a?(String)
arg = arg.gsub(/(\r\n|\n|\r)/, "\r\n")
end
write_attribute(:description, arg)
end
# Overrides attributes= so that tracker_id gets assigned first
def attributes_with_tracker_first=(new_attributes, *args)