Magento2Msp icon indicating copy to clipboard operation
Magento2Msp copied to clipboard

Exception: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity, line: 1

Open nocturnalfrog opened this issue 7 years ago • 7 comments

The payment link is added as regular text to the order status history in multisafepay/magento2msp/Model/Connect.php:598.

            $order->addStatusToHistory($order->getStatus(), "User redirected to MultiSafepay" . '<br/>' . "Payment link:" . '<br/>' . $this->_client->orders->getPaymentLink(), false);

Example: "User redirected to MultiSafepay
Payment link:
https://betalen.rabobank.nl/ideal-betaling/landingpage?random=6fa15a27097583d087577d99767c0b3b81092ca859a7caa4271e8cac0eae0f95&trxid=999999999999999"

Problem: A CRITICAL error is logged to the exception.log when an order is viewed in the Backend because Magento runs the content of the comment through the \Magento\Sales\Helper\Admin::escapeHtmlWithLinks function that chokes on the & character in the comment that is not properly escaped.

Call stack:

  • ...
  • vendor/magento/module-sales/view/adminhtml/templates/order/view/tab/history.phtml:37
  • vendor/magento/module-sales/Block/Adminhtml/Order/View/Tab/History.php:203
  • vendor/magento/module-sales/Helper/Admin.php:173
  • vendor/magento/framework/Escaper.php:83

nocturnalfrog avatar Apr 02 '19 13:04 nocturnalfrog

Thanks @nocturnalfrog This already has been accepted on our develop branch in https://github.com/MultiSafepay/Magento2Msp/pull/82

Jasper-MultiSafepay avatar Apr 03 '19 12:04 Jasper-MultiSafepay

@Jasper-MultiSafepay, that's a great start. When will there be an official release that includes this fix? Because I notice that #82 was merged four and a half months ago but is still not part of the latest version of this module.

nocturnalfrog avatar Apr 03 '19 12:04 nocturnalfrog

We are currently working on the Magento2 plugin in the current sprint. We hope the official release will be somewhere this month which also includes this fix.

Jasper-MultiSafepay avatar Apr 03 '19 12:04 Jasper-MultiSafepay

@Jasper-MultiSafepay When can we expect the next update?

jorgb90 avatar Jun 06 '19 08:06 jorgb90

@jorgb90 I cannot give an exact date. But when the plugin passes all of our QA tests, we will release it. We hope that our QA tests finish this month.

mikededecker1 avatar Jun 06 '19 09:06 mikededecker1

@Mike-MultiSafepay, I must be dreaming! This bug (and fix) that was reported more than 7 months ago will finally become available?!

nocturnalfrog avatar Jun 06 '19 09:06 nocturnalfrog

@nocturnalfrog Sorry about the big delay in this one. In the background we have been processing major changes within the plugin development flow, causing the with the change release to be delayed. Your feedback will also be noted for our internal retrospective.

Ruud-MultiSafepay avatar Jun 06 '19 12:06 Ruud-MultiSafepay