diff options
author | friendica <info@friendica.com> | 2012-03-21 21:42:27 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-21 21:42:27 -0700 |
commit | f1bbe03df1df48d5fdbe5be1899c89dcb9d37c5e (patch) | |
tree | 2b22d174ab5712caf86ca8c5057bbfeb8a84ac27 /mod/item.php | |
parent | c1d6ece98e9c0793432d1046033e0b8cb93e63bb (diff) | |
download | volse-hubzilla-f1bbe03df1df48d5fdbe5be1899c89dcb9d37c5e.tar.gz volse-hubzilla-f1bbe03df1df48d5fdbe5be1899c89dcb9d37c5e.tar.bz2 volse-hubzilla-f1bbe03df1df48d5fdbe5be1899c89dcb9d37c5e.zip |
work around doubled linefeeds in tinymce3.5b2
Diffstat (limited to 'mod/item.php')
-rwxr-xr-x | mod/item.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/item.php b/mod/item.php index fe570075f..ee6c5c9a7 100755 --- a/mod/item.php +++ b/mod/item.php @@ -243,6 +243,7 @@ function item_post(&$a) { } + if(! strlen($body)) { if($preview) killme(); @@ -253,6 +254,15 @@ function item_post(&$a) { } } + // Work around doubled linefeeds in Tinymce 3.5b2 + // First figure out if it's a status post that would've been + // created using tinymce. Otherwise leave it alone. + + $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); + } // get contact info for poster |