diff options
author | francis <francis> | 2008-04-16 12:00:10 +0000 |
---|---|---|
committer | francis <francis> | 2008-04-16 12:00:10 +0000 |
commit | 4f93923fbe3c1ae178c93d30c82f8b3a692ab6fe (patch) | |
tree | 82ceab0c50b353d109289eaa94eaa1efa869e16a | |
parent | 8fa715e5df5e388ef15581b93c8f16e3e94beede (diff) |
Use Angie's email regexp as it doesn't freeze up.
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | config/environment.rb | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 47ec8c195..6bc8543ab 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.77 2008-04-14 23:24:54 francis Exp $ +# $Id: incoming_message.rb,v 1.78 2008-04-16 12:00:10 francis Exp $ # TODO @@ -149,7 +149,7 @@ class IncomingMessage < ActiveRecord::Base # Remove any email addresses - we don't want bounce messages to leak out # either the requestor's email address or the request's response email # address out onto the internet - rx = Regexp.new(MySociety::Validate.email_match_regexp) + rx = Regexp.new("(\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}\\b)") text.gsub!(rx, "[email address]") return text diff --git a/config/environment.rb b/config/environment.rb index e8898cf39..8de70344c 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -169,3 +169,7 @@ module WillPaginate end end +# XXX temp debug for SQL logging production sites +# ActiveRecord::Base.logger = Logger.new(STDOUT) + + |