Magento: Remove auto breaks (“br/”) from product description

April 16th, 2011 Posted by Public 2 comments on “Magento: Remove auto breaks (“br/”) from product description”

By Default Magento automatically adds


html tags to product descriptions for display on the customer interface.  If you have created a nice description with the WYSIWYG Editor or imported HTML descriptions you most likely want to remove this behavior.   Luckily this is not hard to do.

1.  Find the file “description.phtml” here:  /app/design/frontend/base/default/template/catalog/product/view/description.phtml

2. Make a local copy by copying the file to your local template.  You may need to create the same path in your Magento template (you never want to change core code for upgrade reasons).

New Path: app/design/frontend/default/<template name>/template/catalog/product/view/description.phtml

3.  Remove the “nl2br” tag


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


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

4.  Upload the file to your server.

Tags: ,
  • Petrică Martinescu


  • Mummy Ninja

    It should be $this->getProduct()->getDescription(), ‘description’) not $this->getProduct()->getDescription()), ‘description’