commit: 52d5af6a47a6532575a3d3eef04bc4f7f3dbc7e4 Author: Alex Legler <alex <AT> a3li <DOT> li> AuthorDate: Mon Feb 23 23:43:57 2015 +0000 Commit: Alex Legler <a3li <AT> gentoo <DOT> org> CommitDate: Mon Feb 23 23:43:57 2015 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=52d5af6a
Better email escaping regex --- lib/helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers.rb b/lib/helpers.rb index 5b4d2e3..6844e6d 100644 --- a/lib/helpers.rb +++ b/lib/helpers.rb @@ -45,7 +45,7 @@ helpers do # This method strips domains from header fields. def strip_email_headers(ary) [ary].flatten.map do |email| - email.gsub(/@(.*?)(>|$)/) do |s| + email.gsub(/@(\S*?)(>|$)/) do |s| if $1 == 'gentoo.org' "@g.o#{$2}" elsif $1 == 'lists.gentoo.org'