diff options
author | francis <francis> | 2008-10-28 08:41:04 +0000 |
---|---|---|
committer | francis <francis> | 2008-10-28 08:41:04 +0000 |
commit | 251df15890bdad5e4c095d8954fb0c5440c107e1 (patch) | |
tree | f76b7307c23009ec68602ab65022086e3736b38d | |
parent | 083693f0edb27b7e281e4d5469e901fd72125642 (diff) |
Remove things from outgoing messages also.
-rw-r--r-- | app/models/outgoing_message.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index 437fe07c9..e934e561a 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.67 2008-10-17 07:02:01 francis Exp $ +# $Id: outgoing_message.rb,v 1.68 2008-10-28 08:41:04 francis Exp $ class OutgoingMessage < ActiveRecord::Base belongs_to :info_request @@ -70,6 +70,12 @@ class OutgoingMessage < ActiveRecord::Base end ret = ret.strip ret = ret.gsub(/(?:\n\s*){2,}/, "\n\n") # remove excess linebreaks that unnecessarily space it out + + # Remove things from censor rules + for censor_rule in self.info_request.censor_rules + ret = censor_rule.apply_to_text(ret) + end + ret end def raw_body |