From cfab448cc75e36a1bbfe4af5eab476b495e33ae3 Mon Sep 17 00:00:00 2001 From: Erfan Date: Thu, 9 Nov 2017 16:22:58 +0800 Subject: [PATCH 1/3] Fix for issue 12127: Single quotation marks are now decoded properly in admin attribute option input fields. --- .../templates/catalog/product/attribute/options.phtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml index a0041d2e02988..6ff0e193a774f 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml @@ -88,7 +88,9 @@ $stores = $block->getStoresSortedBySortOrder(); $values = []; foreach($block->getOptionValues() as $value) { $value = $value->getData(); - $values[] = is_array($value) ? array_map("htmlspecialchars_decode", $value) : $value; + $values[] = is_array($value) ? array_map(function($str) { + return htmlspecialchars_decode($str, ENT_QUOTES); + }, $value) : $value; } ?>