Magento Forum

   
Zend_View_Helper_Paragraph
 
lotusseedsD
Mentor
 
Avatar
Total Posts:  1144
Joined:  2007-08-31
 

Is this available in current Zend Framework version?
http://framework.zend.com/issues/browse/ZF-2348;jsessionid=25F47A1261ADD12477BE09CDD270B8BC?page=com.atlassian.jira.ext.fisheye:crucible-issuepanel

note: link doesn’t work, please google “Zend_View_Helper_Paragraph” to get to the page.

code:

class Zend_View_Helper_Paragraph
{
    
public function paragraph($text)
    
{
        
return '<p>' preg_replace('/[\r\n]+(\h+[\r\n]+)?/''</p><p>'trim($text)) . '</p>';
    
}
}

Usage

echo $this->paragraph($this->text);

Will be nice to replace the “nl2brr” in description, overview and additional data.

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