2

Ecg coding standards forbids using html_entity_decode method.

enter image description here

What should we use instead?

4
  • Any updates? What is the alternative and why is it forbidden?
    – Black
    Aug 27, 2019 at 12:32
  • Hi, found any alternated solution ? Jul 9, 2021 at 9:00
  • They are probably no longer offering support to ECG on M1, as it was abandoned on Jul/2020. Jul 9, 2021 at 22:14
  • Any news? I have the same warning in Magento 2
    – 0m3r
    Jul 7, 2022 at 14:25

1 Answer 1

0

In my case I have used the alternate function i.e "htmlspecialchars_decode()"

 $returnArray["message"] = htmlspecialchars_decode(__(
                            "You added %1 to your shopping cart.",
                            $this->helper->stripTags($product->getName())
                        ));

Hope this solution may work for you.

Happy coding :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.