Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for #15393 #15687

Merged
merged 3 commits into from Jul 29, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Helper/Output.php
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
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
Expand Up @@ -217,7 +217,7 @@ public function testGetAttributeTextArray()
$expected = [
'Option 2',
'Option 3',
'Option 4 "!@#$%^&*'
Copy link
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