]> git.mxchange.org Git - friendica.git/blobdiff - include/api.php
When showing posts for a contact we have to tread forums in a special way
[friendica.git] / include / api.php
index 3c84f46f760f3aaf15f1d0f8ae1ec3f29d4066f2..bd579bf19adc3a1dacc0d5f3d9159a5caf0aab18 100644 (file)
@@ -2276,14 +2276,11 @@ $called_api = null;
 
                $statushtml = trim(bbcode($body, false, false));
 
+               // Workaround for clients with limited HTML parser functionality
                $search = array("<br>", "<blockquote>", "</blockquote>",
                                "<h1>", "</h1>", "<h2>", "</h2>",
                                "<h3>", "</h3>", "<h4>", "</h4>",
                                "<h5>", "</h5>", "<h6>", "</h6>");
-//             $replace = array(" \n<br>", " \n<blockquote>", "</blockquote>\n ",
-//                             " \n<h1>", "</h1>\n ", " \n<h2>", "</h2>\n ",
-//                             " \n<h3>", "</h3>\n ", " \n<h4>", "</h4>\n ",
-//                             " \n<h5>", "</h5>\n ", " \n<h6>", "</h6>\n ");
                $replace = array("<br>", "<br><blockquote>", "</blockquote><br>",
                                "<br><h1>", "</h1><br>", "<br><h2>", "</h2><br>",
                                "<br><h3>", "</h3><br>", "<br><h4>", "</h4><br>",
@@ -3991,7 +3988,7 @@ $called_api = null;
                                );
 
                // adds link to the thumbnail scale photo
-               $arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record[0]['name'] . '/image/' . $hash . ']'
+               $arr['body'] = '[url=' . System::baseUrl() . '/photos/' . $owner_record[0]['nick'] . '/image/' . $hash . ']'
                                        . '[img]' . System::baseUrl() . '/photo/' . $hash . '-' . "2" . '.'. $typetoext[$filetype] . '[/img]'
                                        . '[/url]';