code

How to remove <br /> added by magento.

In case you're wondering why your product description is all spaced out, then that's because magento is adding automatic line breaks into the content description area...

To get rid of it... look for

nl2br

specifically in description.phtml you'll see

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

it should look like this after you take the nl2br out:

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

Tags: magento code