]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Merge commit 'upstream/master'
[friendica.git] / include / text.php
index 5456b5ad3e5a1248d5b6572a3a2bf114b8dfbc0d..4ec59a66589c05ec8509d53da9e37ec46741fc79 100644 (file)
@@ -80,6 +80,9 @@ function escape_tags($string) {
 if(! function_exists('autoname')) {
 function autoname($len) {
 
+       if($len <= 0)
+               return '';
+
        $vowels = array('a','a','ai','au','e','e','e','ee','ea','i','ie','o','ou','u'); 
        if(mt_rand(0,5) == 4)
                $vowels[] = 'y';
@@ -1503,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