]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
Merge pull request #581 from fermionic/20130112-backport-red-smarty-improvements
[friendica.git] / include / text.php
index aa3fc000a05d1e17f3727dd27372e1f533ee9c5d..d1fff85ea358f7cc866976063eefd3d09047e860 100644 (file)
@@ -1041,13 +1041,13 @@ function prepare_body($item,$attach = false) {
                return $s;
        }
 
-       $arr = explode(',',$item['attach']);
+       $arr = explode('[/attach],',$item['attach']);
        if(count($arr)) {
                $s .= '<div class="body-attach">';
                foreach($arr as $r) {
                        $matches = false;
                        $icon = '';
-                       $cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"\[\/attach\]|',$r,$matches, PREG_SET_ORDER);
+                       $cnt = preg_match_all('|\[attach\]href=\"(.*?)\" length=\"(.*?)\" type=\"(.*?)\" title=\"(.*?)\"|',$r,$matches, PREG_SET_ORDER);
                        if($cnt) {
                                foreach($matches as $mtch) {
                                        $icontype = strtolower(substr($mtch[3],0,strpos($mtch[3],'/')));