Magento Forum

   
Echo out HTML Code Within Attributes
 
Jawbreak
Jr. Member
 
Total Posts:  22
Joined:  2008-04-25
 

I am using 1.2.0.1.

I am trying to interpret HTML code thats embedded within a product attribute.

Here is the following code:

<?php echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description'?>

This one works fine, interpreting the HTML code embedded in the description.

<?php if($_additional $this->getAdditionalData()): ?>
    <?php 
foreach ($_additional as $_data): ?>
        <?php 
echo $this->helper('catalog/output')->productAttribute($this->getProduct(), nl2br($_data['value']), $_data['code']?>
    <?php 
endforeach; ?>
<?php 
endif;?>

This one does not and just prints the tags.

Anyone know how to get attributes that have HTML tags to be interpreted when printed?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jawbreak
Jr. Member
 
Total Posts:  22
Joined:  2008-04-25
 

This is a bug with 1.2.0.1

Fix can be found here:
http://www.magentocommerce.com/boards/viewthread/27155/

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