Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Helper/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 3 additions & 1 deletion app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function testGetAttributeTextArray()
$expected = [
'Option 2',
'Option 3',
'Option 4 "!@#$%^&*'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a good idea to cover more cases with the test. Possibly combinations of plain/html setting for attribue

'Option 4 "!@#$%^&*'
];
self::assertEquals(
$expected,
Expand Down