Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

html code display in attributes
 
wjcstp
Jr. Member
 
Total Posts:  30
Joined:  2008-11-11
 

Under 1.1.8 i was able to use an html table of information for my Specifications attribute, and it displayed correctly on the product page as a formatted table. Under 1.2.0, it now displays as the raw html code.

Is this a new option i’m not seeing, or something i need to reset in code? I don’t know where to look for this switch.

 
Magento Community Magento Community
Magento Community
Magento Community
 
rrroulio
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-03-26
france moselle
 

Try this in attributes.phtml

echo  html_entity_decode($_helper->productAttribute($_product$_data['value'],$_data['code'])) ?></td>

original code is :

$_helper->productAttribute($_product$_data['value'],$_data['code'])

i add html_entity_decode() and html code is ok now

 
Magento Community Magento Community
Magento Community
Magento Community
 
rrroulio
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-03-26
france moselle
 

Try this in attributes.phtml

echo  html_entity_decode($_helper->productAttribute($_product$_data['value'],$_data['code'])) ?></td>

original code is :

$_helper->productAttribute($_product$_data['value'],$_data['code'])

i add html_entity_decode() and html code is ok now

 
Magento Community Magento Community
Magento Community
Magento Community
 
rrroulio
Sr. Member
 
Avatar
Total Posts:  88
Joined:  2008-03-26
france moselle
 

Try this in attributes.phtml

echo  html_entity_decode($_helper->productAttribute($_product$_data['value'],$_data['code'])) ?></td>

original code is :

$_helper->productAttribute($_product$_data['value'],$_data['code'])

i add html_entity_decode() and html code is ok now

 
Magento Community Magento Community
Magento Community
Magento Community
 
Costa
Member
 
Avatar
Total Posts:  56
Joined:  2007-11-21
Shenzhen China
 

As a temp fix:

I have removed the following code:

else {
$value 
$this->htmlEscape($value);
}

From:
app/code/core/Mage/Catalog/Block/Product/View/Attributes.php

If you find other work around please post here

 
Magento Community Magento Community
Magento Community
Magento Community
 
wjcstp
Jr. Member
 
Total Posts:  30
Joined:  2008-11-11
 

The solution here worked for me:

http://www.magentocommerce.com/boards/viewthread/27155/

 
Magento Community Magento Community
Magento Community
Magento Community
 
stiepan
Jr. Member
 
Total Posts:  9
Joined:  2009-12-08
 

Thanks! html_entity_decode does the trick for enabling correct display of html product description with the iPhone theme (1.4.0.1)

 
Magento Community Magento Community
Magento Community
Magento Community
 
anhvanftu
Jr. Member
 
Avatar
Total Posts:  2
Joined:  2009-06-15
 
stiepan - 23 March 2010 05:15 AM

Thanks! html_entity_decode does the trick for enabling correct display of html product description with the iPhone theme (1.4.0.1)

I dont understand what you mean.
But I figure out :
I change :

<?php echo nl2br($this->htmlEscape($this->getProduct()->getDescription())) ?>

To :

<?php echo nl2br($this->getProduct()->getDescription()) ?>

in file description.phtml

“app/design/frontend/default/iphone/template/catalog/product/view/description.phtml”

It works for iphone theme 1.4.0.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
GaelTo
Jr. Member
 
Total Posts:  12
Joined:  2010-08-01
 
anhvanftu - 13 May 2010 07:19 AM

stiepan - 23 March 2010 05:15 AM
Thanks! html_entity_decode does the trick for enabling correct display of html product description with the iPhone theme (1.4.0.1)

I dont understand what you mean.
But I figure out :
I change :

<?php echo nl2br($this->htmlEscape($this->getProduct()->getDescription())) ?>

To :

<?php echo nl2br($this->getProduct()->getDescription()) ?>

in file description.phtml

“app/design/frontend/default/iphone/template/catalog/product/view/description.phtml”

It works for iphone theme 1.4.0.1

Thanks, worked perfect for me!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top