Magento: How to fix double ampersand "&" in product attributes in version 1.6
Magento v1.6 seems to have an annoying bug where by it double escapes the ampersand in product attributes.
If you have, for example, 'Love, Luck & Happiness' as a value of an attribute the following will occur:
'Love, Luck & Happiness' becomes 'Love, Luck & Happiness'.
This then gets double escaped to become:
'Love, Luck & Happiness'
Here's how to temporarily fix that.
Step 1 - Attribute Controller
File to edit is:
Line 168 of /app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php
Comment out the following:
$label = $helperCatalog->escapeHtml($label)
Step 2 - Frontend
File to edit is:
app/design/frontend/default/yourtemplate/catalog/product/view/attributes.phtml
Replace:
htmlEscape($this->__($_data['label'])) ?>
With
stripTags($this->__($_data['label'])) ?>
Your attributes should now correctly display.
Comments
Be the first to comment!