Gentoo Archives: gentoo-commits

From: Alex Legler <a3li@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/ag-web:master commit in: lib/
Date: Wed, 25 Feb 2015 11:00:26
Message-Id: 1424860483.ca2e544c70ac653b65038a60cd0db49983bed0cc.a3li@gentoo
1 commit: ca2e544c70ac653b65038a60cd0db49983bed0cc
2 Author: Alex Legler <alex <AT> a3li <DOT> li>
3 AuthorDate: Wed Feb 25 10:34:43 2015 +0000
4 Commit: Alex Legler <a3li <AT> gentoo <DOT> org>
5 CommitDate: Wed Feb 25 10:34:43 2015 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/ag-web.git;a=commit;h=ca2e544c
7
8 Better email escape
9
10 ---
11 lib/helpers.rb | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14 diff --git a/lib/helpers.rb b/lib/helpers.rb
15 index 6844e6d..987caeb 100644
16 --- a/lib/helpers.rb
17 +++ b/lib/helpers.rb
18 @@ -45,7 +45,7 @@ helpers do
19 # This method strips domains from header fields.
20 def strip_email_headers(ary)
21 [ary].flatten.map do |email|
22 - email.gsub(/@(\S*?)(>|$)/) do |s|
23 + email.gsub(/@(\S*?)('|"|>|$)/) do |s|
24 if $1 == 'gentoo.org'
25 "@g.o#{$2}"
26 elsif $1 == 'lists.gentoo.org'