Skip to content

Commit 436b77a

Browse files
author
Stanislav Idolov
authored
ENGCOM-1909: Fixes for #15393 #15687
2 parents 190d0ae + 5e55f99 commit 436b77a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/code/Magento/Catalog/Helper/Output.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function productAttribute($product, $attributeHtml, $attributeName)
151151
$attributeHtml = nl2br($attributeHtml);
152152
}
153153
}
154-
if ($attribute->getIsHtmlAllowedOnFront() && $attribute->getIsWysiwygEnabled()) {
154+
if ($attribute->getIsHtmlAllowedOnFront() || $attribute->getIsWysiwygEnabled()) {
155155
if ($this->_catalogData->isUrlDirectivesParsingAllowed()) {
156156
$attributeHtml = $this->_getTemplateProcessor()->filter($attributeHtml);
157157
}

app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ public function getOptionText($value)
167167
$optionsText = [];
168168
foreach ($options as $item) {
169169
if (in_array($item['value'], $value)) {
170-
$optionsText[] = $this->escaper->escapeHtml($item['label']);
170+
$optionsText[] = ($this->_attribute->getIsHtmlAllowedOnFront())
171+
? $item['label']
172+
: $this->escaper->escapeHtml($item['label']);
171173
}
172174
}
173175

dev/tests/integration/testsuite/Magento/Catalog/Model/ProductGettersTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ public function testGetAttributeTextArray()
217217
$expected = [
218218
'Option 2',
219219
'Option 3',
220-
'Option 4 "!@#$%^&*'
220+
'Option 4 "!@#$%^&*'
221221
];
222222
self::assertEquals(
223223
$expected,

0 commit comments

Comments
 (0)