Magento: remove break (br) tag from textarea
Posted by admin in Magento
After installing WYSIWYG editor to my magento site the <br /> tags were still added after each row in textareas. My main problem was the product description so I opened file /app/design/frontend/my_theme/my_theme/template/catalog/product/view/description.phtml and found line:
<?php echo $this->helper(’catalog/output’)->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), ‘description’) ?>
and replaced it with:
<?php echo $this->helper(’catalog/output’)->productAttribute($this->getProduct(), $this->getProduct()->getDescription(), ‘description’) ?>
Basically I removed the nl2br() function which inserts the <br /> tags to the description text. You can do the same where ever the breaks are messing up your design view…


