aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/outgoing_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/outgoing_message.rb')
-rw-r--r--app/models/outgoing_message.rb16
1 files changed, 2 insertions, 14 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 77e4a596c..7de70fc17 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -22,7 +22,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: outgoing_message.rb,v 1.93 2009-10-03 10:05:55 francis Exp $
+# $Id: outgoing_message.rb,v 1.94 2009-10-04 21:42:07 francis Exp $
class OutgoingMessage < ActiveRecord::Base
strip_attributes!
@@ -214,25 +214,13 @@ class OutgoingMessage < ActiveRecord::Base
def get_body_for_html_display
text = self.body.strip
self.remove_privacy_sensitive_things!(text)
- text = MySociety::Format.wrap_email_body(text) # reparagraph and wrap it so is good preview of emails
+ text = MySociety::Format.wrap_email_body_by_lines(text) # reparagraph and wrap it so is good preview of emails
text = CGI.escapeHTML(text)
text = MySociety::Format.make_clickable(text, :contract => 1)
text.gsub!(/\[(email address|mobile number)\]/, '[<a href="/help/about#mobiles">\1</a>]')
text = text.gsub(/\n/, '<br>')
return text
end
- # Testing whether we can just wrap lines rather than between blank line separated paragraphs
- def new_get_body_for_html_display
- text = self.body.strip
- self.remove_privacy_sensitive_things!(text)
- text = MySociety::Format.wrap_email_body(text, 67, " ", "\n") # reparagraph and wrap it so is good preview of emails
- text = CGI.escapeHTML(text)
- text = MySociety::Format.make_clickable(text, :contract => 1)
- text.gsub!(/\[(email address|mobile number)\]/, '[<a href="/help/about#mobiles">\1</a>]')
- text = text.gsub(/\n/, '<br>')
- return text
- end
-
def fully_destroy
ActiveRecord::Base.transaction do