summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Legler <alex@a3li.li>2015-02-25 15:19:41 +0100
committerAlex Legler <alex@a3li.li>2015-02-25 15:19:41 +0100
commit38ac05111cba0a13ab89228b17094da936f7c5ef (patch)
tree37a84b8c3822f45a54294f076cbea7cb5cb9bec7
parentAdd robots.txt (diff)
downloadfrontend-38ac05111cba0a13ab89228b17094da936f7c5ef.tar.gz
frontend-38ac05111cba0a13ab89228b17094da936f7c5ef.tar.bz2
frontend-38ac05111cba0a13ab89228b17094da936f7c5ef.zip
Display TLD in escaped header fields
-rw-r--r--lib/helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/helpers.rb b/lib/helpers.rb
index 987caeb..873d50f 100644
--- a/lib/helpers.rb
+++ b/lib/helpers.rb
@@ -51,7 +51,8 @@ helpers do
elsif $1 == 'lists.gentoo.org'
"@l.g.o#{$2}"
else
- "@#{'×' * $1.length}#{$2}"
+ domain, dot, tld = $1.rpartition '.'
+ "@#{'×' * domain.length}.#{tld}#{$2}"
end
end
end