diff options
-rw-r--r-- | app/models/incoming_message.rb | 13 | ||||
-rw-r--r-- | todo.txt | 11 |
2 files changed, 14 insertions, 10 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index d009fdd2e..6af9a4d13 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -17,7 +17,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.84 2008-04-21 15:00:57 francis Exp $ +# $Id: incoming_message.rb,v 1.85 2008-04-21 15:28:38 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -220,11 +220,14 @@ class IncomingMessage < ActiveRecord::Base # http://www.whatdotheyknow.com/request/identity_card_scheme_expenditure # http://www.whatdotheyknow.com/request/parliament_protest_actions # http://www.whatdotheyknow.com/request/64/response/102 + # http://www.whatdotheyknow.com/request/47/response/283 + # http://www.whatdotheyknow.com/request/30/response/166 + # http://www.whatdotheyknow.com/request/52/response/238 ['-', '_', '*'].each do |score| text.gsub!(/(Disclaimer\s+)? # appears just before - (\s*[#{score}]{20,}\n.*? # top line ------------ - (disclaimer:\n|confidential|received\sthis\semail\sin\serror|scanned\sfor\sviruses) - .*?[#{score}]{20,}\n) # bottom line ----------- + (\s*[#{score}]{8,}\s*\n.*? # top line ------------ + (disclaimer:\n|confidential|received\sthis\semail\sin\serror|virus|intended\s+recipient|monitored\s+centrally|intended\s+for\s+the\s+addressee) + .*?[#{score}]{8,}\s*\n) # bottom line ----------- /imx, "\n\n" + replacement) end @@ -246,10 +249,12 @@ class IncomingMessage < ActiveRecord::Base # To end of message sections + # http://www.whatdotheyknow.com/request/123/response/192 original_message = '(' + '''------ This is a copy of the message, including all the headers. ------''' + '|' + '''-----*\s*Original Message\s*-----*''' + '|' + '''-----*\s*Forwarded message.+-----*''' + + '|' + '''-----*\s*Forwarded by.+-----*''' + ')' text.gsub!(/^(#{original_message}\n.*)$/m, replacement) @@ -124,6 +124,7 @@ Remember me box This can't possible be the best way, it is too depressing: http://onrails.org/articles/2006/02/18/auto-login Then consider removing login links from notifications of new responses +Matthew says - only set session cookie first time, not each request Screen scrape this and add link to it on the public body page http://www.ico.gov.uk/Home/tools_and_resources/decision_notices.aspx @@ -185,6 +186,7 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/55/response/96 http://www.whatdotheyknow.com/request/71/response/108 http://www.whatdotheyknow.com/request/police_powers_to_inform_car_insu + http://www.whatdotheyknow.com/request/30/response/166 http://www.whatdotheyknow.com/request/road_safety_campaign_expenditure http://www.whatdotheyknow.com/request/47/response/283 @@ -197,12 +199,9 @@ Quoting fixing TODO: http://www.whatdotheyknow.com/request/148/response/209 http://www.whatdotheyknow.com/request/35/response/191 - http://localhost:3001/request/64/response/102 - http://localhost:3001/request/55/response/96 - http://localhost:3001/request/71/response/108 - http://localhost:3001/request/police_powers_to_inform_car_insu - http://localhost:3001/request/30/response/166 - + + http://www.whatdotheyknow.com/request/52/response/238 + Sources of public bodies ======================== |