Magento 1.4 product-name quotes are converted to html and then escaped
Posted Tue, 02/23/2010 - 11:43am
After upgrading from magento 1.3 to 1.4, if your product headings used quotes " " or ampersands & , then magento may convert these into HTML and then escape that HTML counterparts hence showing e.g.:
"Thermo Balance" Tub & Shower Valve Rough In Valve
like:
"Thermo Balance" Tub & Shower Valve Rough In Valve
The fix is to go into "view.phtml" and change:
<h3 class="product-name">
<?php echo $_helper->productAttribute($_product, $this->htmlEscape($_product->getName()), 'name') ?>
</h3>to
<h3 class="product-name">
<?php echo $this->htmlEscape($_product->getName())?>
</h3>Now...
Notice...I'm not exactly sure what $_helper->productAttribute actually does... so if it inserts the product attribute, e.g. color "red" into the title, then this won't be such a great fix, because it would eliminate that.
If I find a better fix, I'll post here.
Comments
Why not only erase the
by manoo - 05/30/2010 - 6:32am
Why not only erase the "$this->htmlEscape" from the original code? This fixes the double-escaped chars but keeps the original functionality.
THANK YOU MANOO
by Anonymous - 07/16/2010 - 7:57am
THANK YOU MANOO
Post new comment