From: friendica Date: Wed, 11 Apr 2012 00:14:07 +0000 (-0700) Subject: move all fix_mce to one function so it can easily be undone X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=18e225b05167261429df0e8dc4e6acf5cefd6c2a;p=friendica.git move all fix_mce to one function so it can easily be undone --- diff --git a/mod/item.php b/mod/item.php index c30b174577..7f0ca3fc35 100644 --- a/mod/item.php +++ b/mod/item.php @@ -272,8 +272,7 @@ function item_post(&$a) { $plaintext = (local_user() ? intval(get_pconfig(local_user(),'system','plaintext')) : 0); if((! $parent) && (! $api_source) && (! $plaintext)) { - $body = str_replace("\r\n","\n",$body); - $body = str_replace("\n\n","\n",$body); + $body = fix_mce_lf($body); } diff --git a/mod/message.php b/mod/message.php index 1369fde2e2..260f4bb14d 100644 --- a/mod/message.php +++ b/mod/message.php @@ -48,8 +48,7 @@ function message_post(&$a) { $plaintext = intval(get_pconfig(local_user(),'system','plaintext')); if(! $plaintext) { - $body = str_replace("\r\n","\n",$body); - $body = str_replace("\n\n","\n",$body); + $body = fix_mce_lf($body); } $ret = send_message($recipient, $body, $subject, $replyto);