Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sales email subject "&" turns to   #6597

Closed
rbncha opened this issue Sep 13, 2016 · 7 comments
Closed

Sales email subject "&" turns to   #6597

rbncha opened this issue Sep 13, 2016 · 7 comments
Labels
bug report Component: Sales Fixed in 2.1.x The issue has been fixed in 2.1 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release

Comments

@rbncha
Copy link

rbncha commented Sep 13, 2016

Preconditions

PHP 7.0.1
Mysql 5.6.31
Apache 2.4.23
Magento 2.0.7/2.1.0/2.1.1

Steps to reproduce

  1. Admin > Stores > General > General > Store Information > Store Name : change store name something having ampersand "&" like Easy&Piggy
  2. Send an order email.

Expected result

  1. Order email subjected: Your Easy&Piggy order confirmation

Actual result

  1. Your Easy&Piggy order confirmation (& is converted to &)
  2. image
@veloraven
Copy link
Contributor

@rbncha thank you for your report.
Could you please add some formatting to the last line? As I see "& is converted to &" instead of "& is converted to &" and it's confusing.
You can just add "" sign before &

@quienti
Copy link
Contributor

quienti commented Sep 20, 2016

Probably same problem, but with mail subject where ' is '
Add '' do not works.
On Magento 2.1.1

sans titre 1

@olysenko olysenko self-assigned this Oct 13, 2016
@olysenko
Copy link

Hi,
internal ticket is created MAGETWO-58663

@olysenko olysenko added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed in progress labels Oct 13, 2016
@olysenko olysenko removed their assignment Oct 13, 2016
@calvintwr
Copy link

calvintwr commented Feb 3, 2017

any updates on this issue? i see that this issue has no assignment.

@PieterCappelle
Copy link
Contributor

Quick fix is in di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
    <type name="Magento\Email\Model\Template">
        <plugin name="mail_subject" type="VENDOR\MODULE\Plugin\Template" sortOrder="100" />
    </type>
</config>

In Template.php

namespace VENDOR\MODULE\Plugin;

class Template
{
    public function afterGetSubject(
        \Magento\Email\Model\Template $subject,
        $result
    ) {
        return htmlspecialchars_decode((string)$result, ENT_QUOTES);
    }
}

@magento-engcom-team magento-engcom-team added 2.0.x Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development bug report Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Component: Sales labels Sep 11, 2017
@magento-engcom-team magento-engcom-team added the Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed label Oct 2, 2017
@magento-engcom-team
Copy link
Contributor

@rbncha, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

@magento-engcom-team magento-engcom-team added the Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch label Oct 2, 2017
@korostii
Copy link
Contributor

korostii commented Oct 2, 2017

Hi @magento-engcom-team

We tested the issue on 2.3.0-dev, 2.2.0, 2.1.9

That can't be right. As mentioned on the linked PR #9476 , here's the fix: e89d09d
And it seems to be present on 2.2 branch only.

@ihor-sviziev ihor-sviziev added Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release and removed Issue: Cannot Reproduce Cannot reproduce the issue on the latest `2.4-develop` branch labels Nov 10, 2017
@ihor-sviziev ihor-sviziev added the Fixed in 2.1.x The issue has been fixed in 2.1 release line label Nov 10, 2017
magento-engcom-team pushed a commit that referenced this issue Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Sales Fixed in 2.1.x The issue has been fixed in 2.1 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.1.x The issue has been reproduced on latest 2.1 release
Projects
None yet
Development

No branches or pull requests

9 participants