0

我有这个链接:

<div class="email_button">
   <%= link_to "mailto:?subject=#{t('.incredible')}#{@product.title}&body=#{t('.hi')},%0A%0A #{t('.check_it')}#{@canonical_url}", :title => "#{t('.send_email')}", :class => "btn btn-small", :target => "_blank", :rel => "nofollow" do %>
    <i class="icon-envelope"></i>
    <%= "Email" %>
   <% end %>
  </div>

生成的html:

<a title="Send by email" target="_blank" rel="nofollow" class="btn btn-small" href="mailto:?subject=Incredible. Product title &amp;body=Hi,%0A%0A Take a look: http://www.mydomain.com/es/products/myproduct-1">
    <i class="icon-envelope"></i>
    Email
</a>

此代码在访客电子邮件管理器中打开一封新电子邮件。http://www.mydomain.com/es/products/myproduct-1不像html 链接那样可见。它像文本链接一样可见。

如何将 html 链接发送给访问者电子邮件管理器而不是文本链接?

4

0 回答 0