change convertHTMLToText behavior, regarding the replacing of CRLF or LF to single space; now removing them completely, when text to be processed is regarded to be html

This commit is contained in:
Klaus Leithoff 2013-09-18 12:14:59 +00:00
parent a43e26f8b3
commit 5e425398fa

View File

@ -1118,14 +1118,14 @@ class translation
if (stripos($elem,'<pre>')===false) if (stripos($elem,'<pre>')===false)
{ {
//$elem = str_replace('@(\r\n)@i',' ',$elem); //$elem = str_replace('@(\r\n)@i',' ',$elem);
$elem = str_replace(array("\r\n","\n"),' ',$elem); $elem = str_replace(array("\r\n","\n"),($isHTML?'':' '),$elem);
} }
} }
$_html = implode('',$contentArr); $_html = implode('',$contentArr);
} }
else else
{ {
$_html = str_replace(array("\r\n","\n"),' ',$_html); $_html = str_replace(array("\r\n","\n"),($isHTML?'':' '),$_html);
} }
} }
$tags = array ( $tags = array (