]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Merge branch 'pull'
[friendica.git] / include / text.php
index ca8dc5ac3b474569b793a97e555cec979ae0378c..e0f38a3a0d4b8bf9ec53610459d7e0ca797f28b8 100644 (file)
@@ -481,7 +481,7 @@ function get_tags($s) {
        // Otherwise pull out single word tags. These can be @nickname, @first_last
        // and #hash tags.
 
-       if(preg_match_all('/([@#][^ \x0D\x0A,:?]+)([ \x0D\x0A,:?]|$)/',$s,$match)) {
+       if(preg_match_all('/([@#][^ \x0D\x0A,;:?]+)([ \x0D\x0A,;:?]|$)/',$s,$match)) {
                foreach($match[1] as $mtch) {
                        if(strstr($mtch,"]")) {
                                // we might be inside a bbcode color tag - leave it alone
@@ -751,7 +751,9 @@ function prepare_body($item,$attach = false) {
 
        $s = prepare_text($item['body']);
 
-       call_hooks('prepare_body', $s);
+       $prep_arr = array('item' => $item, 'html' => $s);
+       call_hooks('prepare_body', $prep_arr);
+       $s = $prep_arr['html'];
 
        if(! $attach)
                return $s;
@@ -784,8 +786,19 @@ function prepare_body($item,$attach = false) {
                }
                $s .= '<div class="clear"></div></div>';
        }
-       call_hooks('prepare_body_final', $s);
-       return $s;
+
+       $arr = explode(',',$item['tag']);
+       if(count($arr)) {
+               $s .= '<div class="body-tag">';
+               foreach($arr as $r) {
+                       $s .= bbcode($r) . ' ';
+               }
+               $s .= '</div>';
+       }
+
+       $prep_arr = array('item' => $item, 'html' => $s);
+       call_hooks('prepare_body_final', $prep_arr);
+       return $prep_arr['html'];
 }}