source/Application/Controller/Admin/ArticleMain.php
protected function _processLongDesc($sValue)
    {
        // TODO: the code below is redundant, optimize it, assignments should go smooth without conversions
        // hack, if editor screws up text, htmledit tends to do so
        $sValue = str_replace('&amp;nbsp;', '&nbsp;', $sValue);
        $sValue = str_replace('&amp;', '&', $sValue);
        $sValue = str_replace('&quot;', '"', $sValue);
        $sValue = str_replace('&lang=', '&amp;lang=', $sValue);
        $sValue = str_replace('<p>&nbsp;</p>', '', $sValue);
        $sValue = str_replace('<p>&nbsp; </p>', '', $sValue);

        return $sValue;
    }
protected function _processLongDesc($sValue)
    {
        // TODO: the code below is redundant, optimize it, assignments should go smooth without conversions
        // hack, if editor screws up text, htmledit tends to do so
        $sValue = str_replace('&amp;nbsp;', '&nbsp;', $sValue);
        $sValue = str_replace('&amp;', '&', $sValue);
        $sValue = str_replace('&quot;', '"', $sValue);
        $sValue = str_replace('&lang=', '&amp;lang=', $sValue);
        $sValue = str_replace('<p>&nbsp;</p>', '', $sValue);
        $sValue = str_replace('<p>&nbsp; </p>', '', $sValue);

        return $sValue;
    }
protected function _processLongDesc ( $ sValue ) { // TODO: the code below is redundant, optimize it, assignments should go smooth without conversions // hack, if editor screws up text, htmledit tends to do so $ sValue = str_replace ( '&amp;nbsp;' , '&nbsp;' , $ sValue ) ; $ sValue = str_replace ( '&amp;' , '&' , $ sValue ) ; $ sValue = str_replace ( '&quot;' , '"' , $ sValue ) ; $ sValue = str_replace ( '&lang=' , '&amp;lang=' , $ sValue ) ; $ sValue = str_replace ( '<p>&nbsp;</p>' , '' , $ sValue ) ; $ sValue = str_replace ( '<p>&nbsp; </p>' , '' , $ sValue ) ; return $ sValue ; }
Fixes html broken by html editor

@param string $sValue value to fix

@return string
Fixes html broken by html editor