X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Ftext.php;h=4ec59a66589c05ec8509d53da9e37ec46741fc79;hb=572678fef95816deaa1ecafe5cbcfb8cc65963c9;hp=29c781030dd8142d065b5736c6b32e0987c6ae86;hpb=221726392e6ec836623f83320c3ff9afdc876045;p=friendica.git diff --git a/include/text.php b/include/text.php index 29c781030d..4ec59a6658 100644 --- a/include/text.php +++ b/include/text.php @@ -80,7 +80,7 @@ function escape_tags($string) { if(! function_exists('autoname')) { function autoname($len) { - if(! $len) + if($len <= 0) return ''; $vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u'); @@ -1506,3 +1506,8 @@ function undo_post_tagging($s) { return $s; } +function fix_mce_lf($s) { + $s = str_replace("\r\n","\n",$s); + $s = str_replace("\n\n","\n",$s); + return $s; +} \ No newline at end of file