提交 839e2f96 编写于 作者: A Aaron Patterson

cleaning up more crazy!

上级 714fea45
......@@ -501,10 +501,10 @@ def mail_to(email_address, name = nil, html_options = {})
string += 'mailto:'.unpack('C*').map { |c| sprintf("&#%d;", c) }.join
email_address.each_byte do |c|
string += email_address.unpack('C*').map do |c|
char = c.chr
string << (char =~ /\w/ ? sprintf("%%%x", c) : char)
end
char =~ /\w/ ? sprintf("%%%x", c) : char
end.join
content_tag "a", name || email_address_encoded.html_safe, html_options.merge("href" => "#{string}#{extras}".html_safe)
else
content_tag "a", name || email_address_obfuscated.html_safe, html_options.merge("href" => "mailto:#{email_address}#{extras}".html_safe)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册