aboutsummaryrefslogtreecommitdiffstats
path: root/mod/item.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-03-22 09:16:10 +0100
committerzottel <github@zottel.net>2012-03-22 09:16:10 +0100
commit3f3c4aec79bf3ceedd551bae7cec7acfd68e3772 (patch)
treeae5af3e8b7dda429b744c70ea3fda111c30b15c3 /mod/item.php
parent88bbc5e0bc89f84aaf5160546dfa782f8f1d7e5e (diff)
parent576eb6cc389d54c29b29b97d3c6d160e61bbf6ca (diff)
downloadvolse-hubzilla-3f3c4aec79bf3ceedd551bae7cec7acfd68e3772.tar.gz
volse-hubzilla-3f3c4aec79bf3ceedd551bae7cec7acfd68e3772.tar.bz2
volse-hubzilla-3f3c4aec79bf3ceedd551bae7cec7acfd68e3772.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/item.php')
-rwxr-xr-xmod/item.php10
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