Skip to content

Wrong print encoded mail_to #19

@maguri

Description

@maguri

When I set the mail encoded like so:

<%= mail = mail_to("hello-email@domain.com", nil, encode: "javascript") %>

and try to use this mail variable on the html page, the script prints the mail to the html parent where was called the mail_to method and not where the variable is used.

gem ref: mail_to_with_encoding.rb#L92

What I really want to do is to send the variable to a translation using a i18n key in the html like:

<%= t('my.key', email: email) %>
my:
  key: "<p>My translations use %{email} here and then,</p>
        <p>I would like to print the %{email} here, but does not work :(</p>"

The result of using the tranlation key in the html shows the following text:

My translations use hello-email@domain.comhello-email@domain.com here and then,
I would like to print the here, but does not work :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions