From 5e425398fa5181e05ba8f2679fe3836d63b4c9a5 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 18 Sep 2013 12:14:59 +0000 Subject: [PATCH] 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 --- phpgwapi/inc/class.translation.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/class.translation.inc.php b/phpgwapi/inc/class.translation.inc.php index 1197c33195..34c7cf90dc 100644 --- a/phpgwapi/inc/class.translation.inc.php +++ b/phpgwapi/inc/class.translation.inc.php @@ -1118,14 +1118,14 @@ class translation if (stripos($elem,'
')===false)
 					{
 						//$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);
 			}
 			else
 			{
-				$_html = str_replace(array("\r\n","\n"),' ',$_html);
+				$_html = str_replace(array("\r\n","\n"),($isHTML?'':' '),$_html);
 			}
 		}
 		$tags = array (