aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/outgoing_message.rb19
-rw-r--r--todo.txt15
2 files changed, 18 insertions, 16 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 040e9a9a8..a095e3fce 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -21,7 +21,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.46 2008-05-12 01:38:18 francis Exp $
+# $Id: outgoing_message.rb,v 1.47 2008-05-16 12:11:23 francis Exp $
class OutgoingMessage < ActiveRecord::Base
belongs_to :info_request
@@ -50,6 +50,13 @@ class OutgoingMessage < ActiveRecord::Base
end
end
+ def body
+ ret = read_attribute(:body)
+ ret.strip!
+ ret = ret.gsub(/(?:\n\s*){2,}/, "\n\n") # remove excess linebreaks that unnecessarily space it out
+ ret
+ end
+
def body_without_salutation
ret = self.body
ret.sub!(/Dear .+,/, "")
@@ -130,19 +137,11 @@ class OutgoingMessage < ActiveRecord::Base
# Return body for display as HTML
def get_body_for_html_display
- text = self.body
+ text = self.body.strip
text = MySociety::Format.make_clickable(text, :contract => 1)
text = text.gsub(/\n/, '<br>')
return text
end
-
- def get_body_for_neat_html_display
- text = self.body
- text = MySociety::Format.make_clickable(text, :contract => 1)
- text = text.gsub(/\n\n/, '<br>')
- return text
- end
-
# Return body for display as HTML
# XXX this is repeating code in a combination of
diff --git a/todo.txt b/todo.txt
index ec403960d..a3ebfaf8a 100644
--- a/todo.txt
+++ b/todo.txt
@@ -36,19 +36,21 @@ Blog posts / Wikipedia articles about this request
http://reportr.net/2008/04/24/bbc-spent-6m-to-develop-the-iplayer/
Or just look at referrers as Julian says
-Check that this, which was success marked late by admin (me), makes it into
-RSS feed OK.
-http://www.whatdotheyknow.com/request/breakdown_of_calulation_of_jsa
-
Test: In email alerts, show request heading somewhere
-Debug for search track emails
-Highlight words in them, and in RSS
+Add test code for search track emails
+Highlight words in them with *
+ and also highling in RSS
Check test code coverage again
+Reconsider described vs. newest for the tracks
+
Later
=====
+Bit confusing that sort order when you do "variety:successful" in query is by the date of creation.
+Should probably use the described date a lot more often for dates. But not sure, hard to tell.
+
HTML in Atom feed ask Tommy about it
Check this again after a while, for dodgy states of events:
@@ -219,6 +221,7 @@ Quoting fixing TODO:
http://www.whatdotheyknow.com/request/235/response/513
http://www.whatdotheyknow.com/request/299/response/484
http://www.whatdotheyknow.com/request/320/response/605 (encoding, vcf)
+ http://www.whatdotheyknow.com/request/118/response/600 (encoding)
Sources of public bodies
========================