13142 - fix extratab paragraph tag filtering

This commit is contained in:
Rodney Figaro 2017-05-09 11:20:07 +02:00
parent d9a0b58810
commit 819f320ff5

View File

@ -821,7 +821,7 @@ class ExtraTabs extends Module
// antadis 13142 - when imported by csv, description is not embedded as paragraphs. But it is embedded as paragraph when
// saving product in BO. So ensure description is embedded here.
if (!empty($params['product']->description)) {
$params['product']->description = '<p>'.rtrim(ltrim($params['product']->description, '<p>'), '</p>').'</p>';
$params['product']->description = '<p>'.preg_replace(array('/^<p>/i', '/<\/p>$/i'), '', $params['product']->description).'</p>';
}
$this->smarty->assign('product', $params['product']);