From a49618ada2a310601cdf1568bca28170d70bcfc5 Mon Sep 17 00:00:00 2001 From: simonjanguapa Date: Sat, 2 Jun 2018 12:51:07 +0200 Subject: [PATCH 1/3] Update Output.php --- app/code/Magento/Catalog/Helper/Output.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Catalog/Helper/Output.php b/app/code/Magento/Catalog/Helper/Output.php index facd5351f269a..b14274b950db5 100644 --- a/app/code/Magento/Catalog/Helper/Output.php +++ b/app/code/Magento/Catalog/Helper/Output.php @@ -151,7 +151,7 @@ public function productAttribute($product, $attributeHtml, $attributeName) $attributeHtml = nl2br($attributeHtml); } } - if ($attribute->getIsHtmlAllowedOnFront() && $attribute->getIsWysiwygEnabled()) { + if ($attribute->getIsHtmlAllowedOnFront() || $attribute->getIsWysiwygEnabled()) { if ($this->_catalogData->isUrlDirectivesParsingAllowed()) { $attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml); } From 28159a37d1b63e69a72e7cd21022bde533721cc6 Mon Sep 17 00:00:00 2001 From: simonjanguapa Date: Sat, 2 Jun 2018 12:52:15 +0200 Subject: [PATCH 2/3] Update Table.php --- app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php index bd77b952a07b8..0f3b8be32b988 100644 --- a/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php +++ b/app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php @@ -167,7 +167,9 @@ public function getOptionText($value) $optionsText = []; foreach ($options as $item) { if (in_array($item['value'], $value)) { - $optionsText[] = $this->escaper->escapeHtml($item['label']); + $optionsText[] = ($this->_attribute->getIsHtmlAllowedOnFront()) + ? $item['label'] + : $this->escaper->escapeHtml($item['label']); } } From edb35169ddf49d5b7cb7f0798021a4c945c537fd Mon Sep 17 00:00:00 2001 From: simonjanguapa Date: Sat, 2 Jun 2018 15:28:06 +0200 Subject: [PATCH 3/3] Update ProductGettersTest.php Updated tests --- .../testsuite/Magento/Catalog/Model/ProductGettersTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php index 6ea7c19dce91e..1ed0057ca2486 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php @@ -217,7 +217,7 @@ public function testGetAttributeTextArray() $expected = [ 'Option 2', 'Option 3', - 'Option 4 "!@#$%^&*' + 'Option 4 "!@#$%^&*' ]; self::assertEquals( $expected,