mirror of
https://github.com/friendica/friendica
synced 2024-11-10 07:42:53 +00:00
work around doubled linefeeds in tinymce3.5b2
This commit is contained in:
parent
c1d6ece98e
commit
f1bbe03df1
1 changed files with 10 additions and 0 deletions
10
mod/item.php
10
mod/item.php
|
@ -243,6 +243,7 @@ function item_post(&$a) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(! strlen($body)) {
|
if(! strlen($body)) {
|
||||||
if($preview)
|
if($preview)
|
||||||
killme();
|
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
|
// get contact info for poster
|
||||||
|
|
Loading…
Reference in a new issue