]> git.mxchange.org Git - friendica.git/blobdiff - mod/item.php
Merge branch 'master' of git://github.com/tobiasd/friendika
[friendica.git] / mod / item.php
index f9bf9a04e066316bd971435de3e1cf0f3d484fb9..feef7c95f8f5f3cea88e23579110e81b292bd130 100644 (file)
@@ -165,7 +165,11 @@ function item_post(&$a) {
                }
        }
 
+       /**
+        * Fold multi-line [code] sequences
+        */
 
+       $body = preg_replace('/\[\/code\]\s*\[code\]/m',"\n",$body); 
 
        /**
         * Look for any tags and linkify them
@@ -228,7 +232,7 @@ function item_post(&$a) {
                                        }
                                }
                                if($profile) {
-                                       $body = str_replace($name,'[url=' . $profile . ']' . $newname   . '[/url]', $body);
+                                       $body = str_replace('@' . $name, '@' . '[url=' . $profile . ']' . $newname      . '[/url]', $body);
                                        $profile = str_replace(',','%2c',$profile);
                                        if(strlen($str_tags))
                                                $str_tags .= ',';