]> git.mxchange.org Git - friendica.git/commitdiff
move all fix_mce to one function so it can easily be undone
authorfriendica <info@friendica.com>
Wed, 11 Apr 2012 00:14:07 +0000 (17:14 -0700)
committerfriendica <info@friendica.com>
Wed, 11 Apr 2012 00:14:07 +0000 (17:14 -0700)
mod/item.php
mod/message.php

index c30b1745777437859e42871282aec3aeaefb4ca1..7f0ca3fc355c515a80b88d43113978a7ec4a03bd 100644 (file)
@@ -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);
        }
 
 
index 1369fde2e2708af28e2d55ddd28ea1e053bda21e..260f4bb14d30045b93c62b0eff4e10fabde70706 100644 (file)
@@ -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);