tags, it is necessary to strip those off before you convert all of the tags, otherwise you will get double spacing" * * @access public * @static * @param string $str * @return string */ static function br2nl($str) { $str = preg_replace("/(\r\n|\n|\r)/", "", $str); return preg_replace('=
=i', "\n", $str); } }