Closed
Description
Preconditions
- Vanilla Magento 2.2.6
- PHP Version 7.0.31
Steps to reproduce
- Create a customer via Backend with the last name "Foo & Bar Corp"
- Create an order (via frontend is fine)
- Export the order via XML interfcae
curl -XPOST -H 'Content-Type: application/json' http://hostname/rest/V1/integration/admin/token -d '{ "username": "admin_username", "password": "admin_password" }'
export B=code received above
curl -X GET --header "Accept: application/xml" --header "Authorization: Bearer $B" "http://hostname/rest/english/V1/orders/1"
Expected result
The customer_lastname
tag should contain Foo & Bar Corp
Actual result
The customer_lastname
tag contains Foo &amp Bar Corp
Summary
So I think at some point (2014) there was a bug in PHP (SimpleXML) that contained the issue with the ampersand, so that was a fix so that this won't influence any functionality. Currently, on 7.0+ this fix doesn't make sense and creates an error.
Proposed solution
Magento\Framework\Webapi\Rest\Response\Renderer
class, _formatValue
method. Delete the replacement of the ampersand. This solves the issue.
Metadata
Metadata
Assignees
Labels
Use with concrete module component label E.g. "Component: Webapi" + "Catalog"The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release