Skip to content

Commit

Permalink
ENGCOM-1909: Fixes for #15393 #15687
Browse files Browse the repository at this point in the history
 - Merge Pull Request #15687 from simonjanguapa/magento2:2.2-develop
 - Merged commits:
   1. a49618a
   2. 28159a3
   3. edb3516
  • Loading branch information
magento-engcom-team committed Jun 7, 2018
2 parents 00c6b48 + edb3516 commit 5e55f99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
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 "!@#$%^&*'
'Option 4 "!@#$%^&*'
];
self::assertEquals(
$expected,
Expand Down

0 comments on commit 5e55f99

Please sign in to comment.