• Resolved Simijonovic

    (@simijonovic)


    Hello,

    I am using Polylang. My website title, entered in General Settings of WordPress contains ampersand – &. When I check that string in Polylang, “&” is replaced with “& amp ;”, in both languages. This is not problem in browser, since it is rendered as simple &, but with autoresponder emails within sender field. So in field From there is this code instead of &.

    Regards,

    Ivan

    https://wordpress.org/plugins/polylang/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Chouby

    (@chouby)

    Hi!

    This is not a problem with Polylang but with the plugin which sends emails.

    If you de-activate Polylang and put an & in General Settings->Site title, and then look in your DB in wp_options->blogname you will see that your & is encoded as &

    Thread Starter Simijonovic

    (@simijonovic)

    Thanks for the quick reply.

    Thread Starter Simijonovic

    (@simijonovic)

    I thought that, since I don’t have plugin that sends mail, but it is enfold theme contact form, I should ask them. I see that this is how & is translated to HTML, but except Polylang translations of site title which appears in From field in emails, everywhere else is OK.

    Thread Starter Simijonovic

    (@simijonovic)

    Hi Chouby,

    Enfold uses wp_mail or mail to send the messages, the theme just sends the data and the server does the sending. This issue appeared right after I installed Polylang – as a string and string translations of Site title in Polylang there is ampersand code which also appear in a sender field. I tried to enter again both plain ampersand and HTML code, but nothing helped.

    Do you have any idea about this?

    Thanks!

    Plugin Author Chouby

    (@chouby)

    Did you make the test I suggest?

    De-activate Polylang put an & in your blog name in General settings, then see how it looks in DB and in your e-mail.

    Thread Starter Simijonovic

    (@simijonovic)

    Hello,

    Thanks for reply.
    Sorry for duplicate topic, it looked to me that previous topic was closed.

    I tried that. HTML code for ampersand was already in site title before Polylang installation, so I tried removing it, but, unfortunately nothing helped.

    I would like to share this if someone have a same issue: adding

    add_filter( ‘wp_mail_from_name’, ‘my_mail_from_name’ );
    function my_mail_from_name( $name )
    {
    return “FROM FIELD”;
    }

    to functions.php solved problem.

    Thanks for help.

    Regards,

    Ivan

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Ampersand is changed to HTML code’ is closed to new replies.